public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "david.marchand at redhat dot com" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug stdio/31137] New: Regression vfprintf + setbuf (no buffering) Date: Mon, 11 Dec 2023 12:58:41 +0000 [thread overview] Message-ID: <bug-31137-131@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=31137 Bug ID: 31137 Summary: Regression vfprintf + setbuf (no buffering) Product: glibc Version: 2.37 Status: NEW Severity: normal Priority: P2 Component: stdio Assignee: unassigned at sourceware dot org Reporter: david.marchand at redhat dot com Target Milestone: --- Created attachment 15252 --> https://sourceware.org/bugzilla/attachment.cgi?id=15252&action=edit log.c For the context, OVS has its logging framework (which writes to file, console, syslog etc...). DPDK is a library for networking datapath in userspace, and its components generate log messages through its own framework. DPDK provides a way to redirect those logs by passing a FILE * from fopencookie. OVS does this and disables buffering. After updating from f37 to f38 (glibc-2.36-17.fc37.x86_64 to glibc-2.37-13.fc38.x86_64), I noticed a change in how the logs are written for dpdk messages in OVS. Example of output: 2023-11-17T12:50:38.137Z|00059|dpdk|INFO|VHOST_CONFIG: (/home/dmarchan/git/pub/ovs/master/build/tests/system-dpdk-testsuite.dir/003/dpdkvhostclient0) Linear buffers requ 2023-11-17T12:50:38.137Z|00060|dpdk|INFO|ested without external buffers, The log message has been split in 128 bytes chunks (if I count correctly). I attached a simple reproducer (to mimick what is done in OVS, which takes over DPDK logs with a similar fopencookie + setbuf in non buffering mode). # From a f37 container: [root@cb7d749e838f ~]# gcc -o log -Wall -Werror log.c; ./log no setbuf ========= Calling fprintf idx=0 size=511 Calling vfprintf idx=0 size=511 setbuf _IONBF ============= Calling fprintf idx=0 size=511 Calling vfprintf idx=0 size=511 # From a f38 container: [root@3fbf304e6894 ~]# gcc -o log -Wall -Werror log.c; ./log no setbuf ========= Calling fprintf idx=0 size=511 Calling vfprintf idx=0 size=511 setbuf _IONBF ============= Calling fprintf idx=0 size=511 Calling vfprintf idx=0 size=128 idx=1 size=128 idx=2 size=128 idx=3 size=127 -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2023-12-11 12:58 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-12-11 12:58 david.marchand at redhat dot com [this message] 2023-12-11 13:00 ` [Bug stdio/31137] " fweimer at redhat dot com 2023-12-11 13:32 ` schwab@linux-m68k.org 2023-12-11 13:48 ` fweimer at redhat dot com 2023-12-11 15:04 ` schwab@linux-m68k.org 2023-12-11 17:37 ` fweimer at redhat dot com 2024-04-16 17:21 ` carlos at redhat dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-31137-131@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).