Linux core_pattern fail

  1. core_pattern obeys the current chroot, which effectively makes it useless as a way to collect cores centrally if your system has any chrooted processes.
  2. core_pattern explicitly prevents you from dumping to non-regular files. In a virtual environment it’d be very useful to coredump to a block device.

3 Comments

Filed under Uncategorized

3 responses to “Linux core_pattern fail

  1. Ray Strode

    I believe you can dump to an arbitrary programs stdin though by using a | symbol.

    That means you could dump to a device by using | dd or whatever.

    • rich

      We know about this, but it doesn’t solve the chroot problem, and it’s pessimal for devices because it doesn’t preserve sparseness (unless you write your own user process which is unnecessarily complex).

      • Ray Strode

        I agree things could be better, but two ideas:

        1) I think you can gleen the current chroot by looking at the crashing process /proc entry
        2) I wrote this little test program during my lunch break:

        http://rstrode.fedorapeople.org/dd-a-sparse-file.sh.txt

        $ sudo dd-a-spare-file.sh core.3785 core-copy

        It was just a little experiment to see if copying only the dense parts of a sparse file was feasble.

        Granted, it would probably be a lot more complicated to translate that into a C helper program.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s