Messages in this thread Patch in this message | | | Date | Wed, 15 Dec 1999 06:51:34 +0100 | From | Joerg Beyer <> | Subject | shm related oops and patch for 2.3.32 |
| |
Hi,
I had a problem starting my system with linux-2.3.32: apache did not start and left this in the syslog:
---- start ---- Dec 14 18:56:41 dilbert kernel: kernel BUG at /usr/src/linux/include/asm/spinlock.h:92! Dec 14 18:56:41 dilbert kernel: invalid operand: 0000 Dec 14 18:56:41 dilbert kernel: CPU: 1 ---- end ----
(This is an SMP System)
I also found this oops: --- ksymoops --- Options used: -V (default) -o /lib/modules/2.3.32/ (default) -k /proc/ksyms (default) -l /proc/modules (default) -m /usr/src/linux/System.map (default) -c 1 (default)
You did not tell me where to find symbol information. I will assume that the log matches the kernel and modules that are running right now and I'll use the default options above for symbol resolution. If the current kernel and/or modules do not match the log, you can get more accurate output by telling me the kernel version and where to find map, modules, ksyms etc. ksymoops -h explains the options.
invalid operand: 0000 CPU: 1 EIP: 0010:[<c015d13b>] EFLAGS: 00010286 eax: 00000038 ebx: c5f0cba8 ecx: 00000000 edx: 00000000 esi: c5f0cb60 edi: 0000000c ebp: c5f0cba0 esp: c5855f54 ds: 0018 es: 0018 ss: 0018 Process httpd (pid: 287, stackpage=c5855000) Stack: 0000005c 00000000 00000000 0000b404 00000380 00000000 c015d1ef 00000000 00000380 0000b404 00000380 00000000 00000000 0000b404 c0113f2d 00000000 0000b404 00000380 c5854000 00000380 00000000 bffffc98 c5a8d0dc c5a8d0c0 Call Trace: [<c015d1ef>] [<c0113f2d>] [<c010d3c5>] [<c010d2b4>] Code: 0f 0b 83 c4 0c f0 0f ba 35 34 fd 2d c0 00 0f b7 46 0e c1 e0
>>EIP: c015d13b <newseg+1c3/1e4> Trace: c015d1ef <sys_shmget+93/25c> Trace: c0113f2d <sys_ipc+1b1/1d4> Trace: c010d3c5 <error_code+2d/34> Trace: c010d2b4 <system_call+34/38> Code: c015d13b <newseg+1c3/1e4> 00000000 <_EIP>: <=== Code: c015d13b <newseg+1c3/1e4> 0: 0f 0b ud2a <=== Code: c015d13d <newseg+1c5/1e4> 2: 83 c4 0c addl $0xc,%esp Code: c015d140 <newseg+1c8/1e4> 5: f0 0f ba 35 34 fd 2d lock btrl $0x0,0xc02dfd34 Code: c015d147 <newseg+1cf/1e4> c: c0 00 Code: c015d149 <newseg+1d1/1e4> e: 0f b7 46 0e movzwl 0xe(%esi),%eax Code: c015d14d <newseg+1d5/1e4> 12: c1 e0 00 shll $0x0,%eax
1 warning issued. Results may not be reliable. --- ksymoops ---
this lead me to newseg() in ipc/shm.c where I found a shm_unlock (near the bottom of the function) without a matching shm_lock. I am not sure about the place but I assume a shm_lock() is also needed. At least this stopped the above error.
I append the patch that works for me. Is it obviously correct?
Feel free to contact me if you need any info about my system or whatever is needed.
hope this helps Joerg
--- linux/ipc/shm.c Tue Dec 14 21:33:39 1999 +++ linux-jb/ipc/shm.c Tue Dec 14 21:32:54 1999 @@ -202,6 +202,9 @@ kfree(shp); return -ENOSPC; } + + shm_lock(id); + shp->u.shm_perm.key = key; shp->u.shm_perm.mode = (shmflg & S_IRWXUGO); shp->u.shm_segsz = size; -- Computer Science is no more about computers than astronomy is about telescopes. Edsgar W. Dijkstra - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |