Created
April 25, 2012 23:56
-
-
Save jclulow/2494575 to your computer and use it in GitHub Desktop.
bug in "df -h"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| steps to reproduce: | |
| 1. make a cifs share on another host | |
| 2. mount it with smbfs | |
| 3. unshare the cifs share on that other host | |
| 4. df -h | |
| problem: | |
| dumps core with arithmetic exception here: | |
| 08047a98 libc_hwcap2.so.1`UDiv+0x2a(8047c00, 0, 0, 0, 400, 8047af8) | |
| 08047ca8 k_output+0x3ab(806aaa0, 8047ce0, 8047db8, 8055422) | |
| 08047db8 do_df+0x11e(0, 8047df4, 8047df8, feffbafc) | |
| 08047de0 _start+0x7d(2, 8047ea0, 8047ea3, 0, 8047ea6, 8047eb1) | |
| the call prior to 0x3ab was: | |
| k_output+0x3a6: call -0xe43 <number_to_scaled_string> | |
| doing this: | |
| dtrace -q -n 'pid$target::k_output:entry { self->k_output = 1; } pid$target::k_output:return { self->k_output = 0; } pid$target::number_to_scaled_string:entry /self->k_output/ { printf("num: %llu\tunit_from: %d\tscale: %d\n", (unsigned long long) arg1, arg2, arg3); }' -c 'df -h' | |
| the last line of output is: | |
| num: 0 unit_from: 0 scale: 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment