Skip to contentSkip to conversation

Apache cannot start

2.6.3-mm1 Jan Marek 2 participants 2 messages Feb 19, 2004

lore
Share & tools
lore

Jan Marek

author
#0 lore raw

Hallo lkml,

I have problem with kernel 2.6.3-mm1: apache cannot start. Some last lines from strace output:

3299  shmget(IPC_PRIVATE, 737284, IPC_CREAT|0600) = 393216
3299  shmat(393216, 0, 0)               = -1 EINVAL (Invalid argument)
3299  time(NULL)                        = 1077193406
3299  write(15, "[Thu Feb 19 13:23:26 2004] [emer"..., 69) = 69
3299  shmctl(393216, IPC_64|IPC_RMID, 0) = 0
3299  munmap(0x40018000, 4096)          = 0
3299  exit_group(2)                     = ?

I think, that problem is in the calling shmat function?

My last kernel was 2.6.2-mm1 and here apache went without problems...

Sincerely
Jan Marek

Signature · 4 lines
Ing. Jan Marek
University of South Bohemia
Academic Computer Centre
Phone: +420-38-7772080
#1 lore raw

On Thu, 19 Feb 2004 14:12:21 +0100 Jan Marek <[email protected]> wrote:

| Hallo lkml,
| 
| I have problem with kernel 2.6.3-mm1: apache cannot start. Some last
| lines from strace output:
| 
| 3299  shmget(IPC_PRIVATE, 737284, IPC_CREAT|0600) = 393216
| 3299  shmat(393216, 0, 0)               = -1 EINVAL (Invalid argument)
| 3299  time(NULL)                        = 1077193406
| 3299  write(15, "[Thu Feb 19 13:23:26 2004] [emer"..., 69) = 69
| 3299  shmctl(393216, IPC_64|IPC_RMID, 0) = 0
| 3299  munmap(0x40018000, 4096)          = 0
| 3299  exit_group(2)                     = ?
| 
| I think, that problem is in the calling shmat function?
| 
| My last kernel was 2.6.2-mm1 and here apache went without problems...

Patch from Andrew is below.

--
~Randy

ipc/shm.c renamed from ipc/shm.c~add-syscalls_h-shmat-fix +1 -1
diff -puN ipc/shm.c~add-syscalls_h-shmat-fix ipc/shm.c
@@ -635,7 +635,7 @@ out:
  * "raddr" thing points to kernel space, and there has to be a wrapper around
  * this.
  */
-long sys_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr)
+asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr)
 {
 	struct shmid_kernel *shp;
 	unsigned long addr;