Bug #2352 mysqld should write location of the corefile
Submitted: 12 Jan 2004 3:43 Modified: 12 Dec 2005 14:27
Reporter: Martin Mokrejs Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:4.0.17 OS:Linux (Linux 2.4.25-pre4)
Assigned to: CPU Architecture:Any

[12 Jan 2004 3:43] Martin Mokrejs
Description:
When using --core-file option, mysqld while printing: "Writing a core file\n" should write it's current working directory, so that we know where to look for corefile. Unfortunately, not always corefile is really created. Yes, I did "ulimit -c unlimited". ;)

[pid 24610] write(2, "0x80715f7\n", 100x80715f7
) = 10
[pid 24610] write(2, "0x8299034\n", 100x8299034
) = 10
[pid 24610] write(2, "0x8048101\n", 100x8048101
) = 10
[pid 24610] write(2, "New value of fp=(nil) failed san"..., 68New value of fp=(nil) failed sanity check, terminating stack trace!
) = 68
[pid 24610] write(2, "Please read http://www.mysql.com"..., 216Please read http://www.mysql.com/doc/en/Using_stack_trace.html and follow instructions on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do 
resolve it
) = 216
[pid 24610] write(2, "Trying to get some variables.\nSo"..., 90Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
) = 90
[pid 24610] write(2, "thd->query at (nil) ", 20thd->query at (nil) ) = 20
[pid 24610] write(2, " is invalid pointer\n", 20 is invalid pointer
) = 20
[pid 24610] write(2, "thd->thread_id=0\n", 17thd->thread_id=0
) = 17
[pid 24610] write(2, "The manual page at http://www.my"..., 139The manual page at http://www.mysql.com/doc/en/Crashing.html contains
information that should help you find out what is causing the crash.
) = 139
[pid 24610] write(2, "Writing a core file\n", 20Writing a core file
) = 20
[pid 24610] rt_sigaction(SIGSEGV, {SIG_DFL}, {SIG_DFL}, 8) = 0
[pid 24610] kill(24610, SIGSEGV)        = 0
[pid 24610] --- SIGSEGV (Segmentation fault) @ 0 (0) ---
[pid 24610] +++ killed by SIGSEGV +++
[pid 24612] rt_sigprocmask(SIG_BLOCK, [HUP QUIT ALRM TERM TSTP], NULL, 8) = 0
[pid 24612] rt_sigprocmask(SIG_BLOCK, NULL, [HUP INT QUIT PIPE ALRM TERM TSTP RTMIN], 8) = 0
[pid 24612] rt_sigsuspend(~[HUP QUIT ALRM TERM TSTP 33] <unfinished ...>
[pid 24611] <... poll resumed> [{fd=5, events=POLLIN}], 1, 2000) = 0
[pid 24611] getppid()                   = 1
[pid 24611] kill(24612, SIGKILL)        = 0
[pid 24612] +++ killed by SIGKILL +++
_exit(0)                                = ?
Process 24611 detached

How to repeat:
Official stand linux binaries 4.0.17.
[13 Jan 2004 10:40] Dean Ellis
I'm changing this to a feature request, although you should see core files going to your data directory.  Some systems, also, will not create core files if you are using the --user option.
[10 Dec 2005 17:30] Valeriy Kravchuk
The core file can be easily found using find command (by name, by creation date etc.). See also the previous comment for the usual location.

The problem of MySQL server not creating core files for some reasons on some systems has nothing to do with this feature request.
[12 Dec 2005 14:27] Martin Mokrejs
Valeryi,
  it's just few lines of simple code to prepend the directory location in front of the core filename. Of course the file can be found by find(1), but I just don't understand why you don't want to make life easier to the users. Please!