Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 261759 - app-benchmarks/bootchart: Races with udev creating /dev/null on tmpfs
Summary: app-benchmarks/bootchart: Races with udev creating /dev/null on tmpfs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-08 19:54 UTC by Matthias Schwarzott
Modified: 2009-03-10 13:03 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Use private /dev/null located in tmpfs (bootchart-dev-null.diff,640 bytes, patch)
2009-03-08 19:55 UTC, Matthias Schwarzott
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Schwarzott gentoo-dev 2009-03-08 19:54:42 UTC
app-benchmarks/bootchart and the udev init-script/addon interact badly when it comes to using /dev/null.

When booting with init=/sbin/bootchartd, bootchart catches in between mounting tmpfs and mknod /dev/null (and mknod does not overwrite existing files).
"mknod /dev/null" is needed as udevd needs a proper /dev/null to exist to daemonize itself.

As bootchart writes to /dev/null at every sample point it will accidentially create a file /dev/null. So I suggest to change bootchart to copy the existing /dev/null to its tmpfs or mknod one there, and use this.

The problematic /dev/null usage is the one in log_output, line 112:
  eval $cmd 2>/dev/null
Comment 1 Matthias Schwarzott gentoo-dev 2009-03-08 19:55:59 UTC
Created attachment 184357 [details, diff]
Use private /dev/null located in tmpfs

This patch should change bootchart to use its own /dev/null for redirecting while sampling.
Comment 2 Petteri Räty (RETIRED) gentoo-dev 2009-03-08 20:00:55 UTC
Please submit upstream if possible and then you can commit it yourself.
Comment 3 Matthias Schwarzott gentoo-dev 2009-03-10 13:03:48 UTC
Submitted upstream and commited.