Bad permissions on DATADIR/.temporary causes Segmentation Fault
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
Fix Released
|
High
|
Andrew Hutchings | ||
Dexter |
Fix Released
|
High
|
Andrew Hutchings |
Bug Description
I ran into an obscure segmentation fault after [most likely] inadvertently running drizzled as root instead of as 'drizzle':
[root@f12-drizzle ~]# sudo -u drizzle drizzled
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins.
100623 23:15:29 - drizzled got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.
GDB Back Trace (with some debug symbols missing):
-bash-4.0$ gdb drizzled
GNU gdb (GDB) Fedora (7.0.1-48.fc12)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-
For bug reporting instructions, please see:
<http://
Reading symbols from /usr/sbin/
done.
(gdb) run
Starting program: /usr/sbin/drizzled
[Thread debugging using libthread_db enabled]
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins.
Program received signal SIGSEGV, Segmentation fault.
(gdb) bt full
#0 0x0000000000000000 in ?? ()
No symbol table info available.
#1 0x00000000006722ab in drizzled::my_error (nr=2, MyFlags=36) at drizzled/
format = "Can't create file '%-.200s' (errno: %d)"
args = {{gp_offset = 32, fp_offset = 48, overflow_arg_area = 0x7fffffffb1c0,
ebuff = "Can't create file '/var/lib/
#2 0x00000000006554f4 in drizzled:
FileName=0x24 <Address 0x24 out of bounds>, error_message_
MyFlags=<value optimized out>) at drizzled/
No locals.
#3 0x0000000000654d6e in drizzled:
to=
dir=0xbae158 "/var/lib/
at drizzled/
file = -1
org_file = -1
prefix_str = "ibXXXXXX"
#4 0x00000000005c7965 in drizzled:
at drizzled/
filename = "/var/lib/
fd = <value optimized out>
#5 0x00000000006a3547 in innobase_
THE FIX:
Setting the ownership on /var/lib/
[root@f12-drizzle ~]# chown -R drizzle:drizzle /var/lib/
[root@f12-drizzle ~]# sudo -u drizzle drizzled
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins.
100623 23:14:45 InnoDB: highest supported file format is Barracuda.
100623 23:14:45 InnoDB Plugin 1.0.4 started; log sequence number 44534
Listening on 0.0.0.0:9306
Listening on :::9306
Listening on 0.0.0.0:3306
Listening on :::3306
drizzled: Forcing close of thread 0 user: ''
drizzled: ready for connections.
Version: '2010.06.1634' Source distribution (trunk)
drizzled: Normal shutdown
drizzled: Shutdown complete
100623 23:15:00 InnoDB: Starting shutdown...
100623 23:15:00 InnoDB: Shutdown completed; log sequence number 44560
SUGGESTION:
Properly check for the ability to read/write on DATADIR/.temporary and catch the error condition.. providing a useful error message to the user (rather than allowing a segmentation fault condition)
Related branches
- Monty Taylor: Approve
- Andrew Hutchings: Needs Fixing
-
Diff: 80 lines (+15/-14)2 files modifieddrizzled/drizzled.cc (+8/-3)
drizzled/main.cc (+7/-11)
Changed in drizzle: | |
assignee: | nobody → LinuxJedi (thelinuxjedi) |
Changed in drizzle: | |
status: | New → Fix Committed |
Changed in drizzle: | |
status: | Fix Committed → In Progress |
Changed in drizzle: | |
importance: | Undecided → High |
Actually... I see that this was caught by drizzled/error.cc .... Any reason this is not displayed to the user?