# noip-updater broke since upgrading to 2.6.20-Hardened-r2

## Unstable

Hi all,

I have just updated my kernel to the above mentioned version and have managed to get everything back up and running.  I am using PAX and have all the kernel options set for this.  But the only thing left that isn't working is my noip-updater program.

I have re-emerged the binary and set up all the config again for it. But still no joy.  I get the following error on '/etc/init.d/noip start'

```

 * Starting noip ...

Can't get shared memory. (Function not implemented) Ending!

 * noip did not start, error code 1                                                [ !! ]

```

I'm sure it is just a kernel setting i have missed.  I have tried giving the binary full permissions with PAX to eliminate that from the cause.

Thanks in advance.

----------

## Hu

Emerge dev-util/strace, run strace -f -tt -o /tmp/noip.strace /etc/init.d/noip start, and post the last 100 lines of /tmp/noip.strace.  That should show the exact system call which is failing.

----------

## Unstable

Thanks for the reply.

Here is the strace you asked for:

Full contents at http://root.unstable.co.uk/noip.strace

------------------------------------------------------------------

```

11649 18:21:21.130024 <... waitpid resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0) = 11688

11649 18:21:21.130119 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0

11649 18:21:21.130195 --- SIGCHLD (Child exited) @ 0 (0) ---

11649 18:21:21.130239 waitpid(-1, 0x58c01218, WNOHANG) = -1 ECHILD (No child processes)

11649 18:21:21.130301 sigreturn()       = ? (mask now [])

11649 18:21:21.130391 rt_sigaction(SIGINT, {0x808b170, [], 0}, {0x8079e80, [], 0}, 8) = 0

11649 18:21:21.130549 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0

11649 18:21:21.130740 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0

11649 18:21:21.130999 write(1, "\33[A\33[72C  \33[34;01m[ \33[31;01m!!\33["..., 45) = 45

11649 18:21:21.131353 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0

11649 18:21:21.131518 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0

11649 18:21:21.131827 exit_group(1)     = ?

11607 18:21:21.132077 <... waitpid resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0) = 11649

11607 18:21:21.132167 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0

11607 18:21:21.132240 --- SIGCHLD (Child exited) @ 0 (0) ---

11607 18:21:21.132287 waitpid(-1, 0x58c04038, WNOHANG) = -1 ECHILD (No child processes)

11607 18:21:21.132352 sigreturn()       = ? (mask now [])

11607 18:21:21.132443 rt_sigaction(SIGINT, {0x8089920, [], 0}, {0x8079e80, [], 0}, 8) = 0

11607 18:21:21.132738 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0

11607 18:21:21.132996 stat64(".", {st_mode=S_IFDIR|0700, st_size=432, ...}) = 0

11607 18:21:21.133118 stat64("/bin/rm", {st_mode=S_IFREG|0755, st_size=35772, ...}) = 0

11607 18:21:21.133254 stat64("/bin/rm", {st_mode=S_IFREG|0755, st_size=35772, ...}) = 0

11607 18:21:21.133371 rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0

11607 18:21:21.133458 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x4c8d56f8) = 11689

11607 18:21:21.133755 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0

11607 18:21:21.133987 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0

11607 18:21:21.134093 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0

11607 18:21:21.134164 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0

11607 18:21:21.134240 rt_sigaction(SIGINT, {0x8079e80, [], 0}, {0x8089920, [], 0}, 8) = 0

11607 18:21:21.134326 waitpid(-1,  <unfinished ...>

11689 18:21:21.134455 close(255)        = 0

11689 18:21:21.134535 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0

11689 18:21:21.134628 rt_sigaction(SIGTSTP, {SIG_DFL}, {0x8089920, [], 0}, 8) = 0

11689 18:21:21.134707 rt_sigaction(SIGTTIN, {SIG_DFL}, {SIG_DFL}, 8) = 0

11689 18:21:21.134779 rt_sigaction(SIGTTOU, {SIG_DFL}, {SIG_DFL}, 8) = 0

11689 18:21:21.134859 rt_sigaction(SIGINT, {SIG_DFL}, {0x8089920, [], 0}, 8) = 0

11689 18:21:21.134942 rt_sigaction(SIGQUIT, {SIG_DFL}, {0x8089920, [], 0}, 8) = 0

11689 18:21:21.135025 rt_sigaction(SIGCHLD, {SIG_DFL}, {0x8079300, [], 0}, 8) = 0

11689 18:21:21.135104 rt_sigaction(SIGTSTP, {SIG_DFL}, {SIG_DFL}, 8) = 0

11689 18:21:21.135280 execve("/bin/rm", ["rm", "-Rf", "/var/lib/init.d/daemons/noip", "/var/lib/init.d/starting/noip", "/var/lib/init.d/started/noip", "/var/lib/init.d/inactive/noip", "/var/lib/init.d/wasinactive/noip"..., "/var/lib/init.d/stopping/noip", "/var/lib/init.d/scheduled/noip", "/var/lib/init.d/options/noip", "/var/lib/init.d/coldplugged/noip"...], [/* 13 vars */]) = 0

11689 18:21:21.135908 brk(0)            = 0x80585d4

11689 18:21:21.136026 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)

11689 18:21:21.136127 open("/etc/ld.so.cache", O_RDONLY) = 3

11689 18:21:21.136203 fstat64(3, {st_mode=S_IFREG|0644, st_size=22897, ...}) = 0

11689 18:21:21.136299 mmap2(NULL, 22897, PROT_READ, MAP_PRIVATE, 3, 0) = 0x537b0000

11689 18:21:21.136366 close(3)          = 0

11689 18:21:21.136436 open("/lib/libc.so.6", O_RDONLY) = 3

11689 18:21:21.136510 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300Y\1"..., 512) = 512

11689 18:21:21.136601 fstat64(3, {st_mode=S_IFREG|0755, st_size=1197180, ...}) = 0

11689 18:21:21.136690 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x537af000

11689 18:21:21.136772 mmap2(NULL, 1168764, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x53691000

11689 18:21:21.136842 mmap2(0x537a8000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x116) = 0x537a8000

11689 18:21:21.136942 mmap2(0x537ac000, 9596, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x537ac000

11689 18:21:21.137031 close(3)          = 0

11689 18:21:21.137121 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x53690000

11689 18:21:21.137226 set_thread_area({entry_number:-1 -> 6, base_addr:0x536906b0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0

11689 18:21:21.137566 mprotect(0x537a8000, 8192, PROT_READ) = 0

11689 18:21:21.137657 mprotect(0x537d1000, 4096, PROT_READ) = 0

11689 18:21:21.137723 munmap(0x537b0000, 22897) = 0

11689 18:21:21.137989 brk(0)            = 0x80585d4

11689 18:21:21.138054 brk(0x80795d4)    = 0x80795d4

11689 18:21:21.138118 brk(0x807a000)    = 0x807a000

11689 18:21:21.138205 ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0

11689 18:21:21.138318 lstat64("/", {st_mode=S_IFDIR|0755, st_size=440, ...}) = 0

11689 18:21:21.138455 lstat64("/var/lib/init.d/daemons/noip", 0x5c6a6dcc) = -1 ENOENT (No such file or directory)

11689 18:21:21.138547 lstat64("/var/lib/init.d/starting/noip", {st_mode=S_IFLNK|0777, st_size=16, ...}) = 0

11689 18:21:21.138658 unlink("/var/lib/init.d/starting/noip") = 0

11689 18:21:21.138935 lstat64("/var/lib/init.d/started/noip", 0x5c6a6dcc) = -1 ENOENT (No such file or directory)

11689 18:21:21.139015 lstat64("/var/lib/init.d/inactive/noip", 0x5c6a6dcc) = -1 ENOENT (No such file or directory)

11689 18:21:21.139093 lstat64("/var/lib/init.d/wasinactive/noip", 0x5c6a6dcc) = -1 ENOENT (No such file or directory)

11689 18:21:21.139171 lstat64("/var/lib/init.d/stopping/noip", 0x5c6a6dcc) = -1 ENOENT (No such file or directory)

11689 18:21:21.139249 lstat64("/var/lib/init.d/scheduled/noip", 0x5c6a6dcc) = -1 ENOENT (No such file or directory)

11689 18:21:21.139325 lstat64("/var/lib/init.d/options/noip", 0x5c6a6dcc) = -1 ENOENT (No such file or directory)

11689 18:21:21.139401 lstat64("/var/lib/init.d/coldplugged/noip", 0x5c6a6dcc) = -1 ENOENT (No such file or directory)

11689 18:21:21.139485 brk(0x8079000)    = 0x8079000

11689 18:21:21.139580 close(1)          = 0

11689 18:21:21.139644 close(2)          = 0

11689 18:21:21.139715 exit_group(0)     = ?

11607 18:21:21.139851 <... waitpid resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0) = 11689

11607 18:21:21.139939 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0

11607 18:21:21.140012 --- SIGCHLD (Child exited) @ 0 (0) ---

11607 18:21:21.140056 waitpid(-1, 0x58c03f78, WNOHANG) = -1 ECHILD (No child processes)

11607 18:21:21.140120 sigreturn()       = ? (mask now [])

11607 18:21:21.140210 rt_sigaction(SIGINT, {0x8089920, [], 0}, {0x8079e80, [], 0}, 8) = 0

11607 18:21:21.140428 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0

11607 18:21:21.140623 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0

11607 18:21:21.140734 stat64("/var/lib/init.d/softscripts.old", 0x58c04398) = -1 ENOENT (No such file or directory)

11607 18:21:21.140911 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0

11607 18:21:21.141036 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0

11607 18:21:21.141164 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0

11607 18:21:21.141338 rt_sigaction(SIGINT, {SIG_IGN}, {0x8089920, [], 0}, 8) = 0

11607 18:21:21.141430 rt_sigaction(SIGINT, {0x8089920, [], 0}, {SIG_IGN}, 8) = 0

11607 18:21:21.141515 rt_sigaction(SIGQUIT, {SIG_IGN}, {0x8089920, [], 0}, 8) = 0

11607 18:21:21.141599 rt_sigaction(SIGQUIT, {0x8089920, [], 0}, {SIG_IGN}, 8) = 0

11607 18:21:21.141685 rt_sigaction(SIGTSTP, {SIG_IGN}, {0x8089920, [], 0}, 8) = 0

11607 18:21:21.141768 rt_sigaction(SIGTSTP, {0x8089920, [], 0}, {SIG_IGN}, 8) = 0

11607 18:21:21.141894 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0

11607 18:21:21.142212 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0

11607 18:21:21.142334 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0

11607 18:21:21.142474 access("/etc/init.d/noip", X_OK) = 0

11607 18:21:21.142575 stat64("/var/lib/init.d/started/noip", 0x58c04fd8) = -1 ENOENT (No such file or directory)

11607 18:21:21.142698 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0

11607 18:21:21.142783 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0

11607 18:21:21.142926 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0

11607 18:21:21.143003 read(255, "\nexit \"${retval}\"\n\n# vim:ts=4\n", 8192) = 30

11607 18:21:21.143106 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0

11607 18:21:21.143244 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0

11607 18:21:21.143383 exit_group(1)     = ?

```

----------

## Unstable

Looking at that Strace log I here is the function call that is failing (From what i can tell).

```

11653 18:21:19.144931 setsid( <unfinished ...>

11649 18:21:19.145111 <... waitpid resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0) = 11652

11653 18:21:19.145161 <... setsid resumed> ) = 11653

11649 18:21:19.145247 rt_sigprocmask(SIG_SETMASK, [],  <unfinished ...>

11653 18:21:19.145326 shmget(1346981710, 2016, IPC_CREAT|0666 <unfinished ...>

11649 18:21:19.145368 <... rt_sigprocmask resumed> NULL, 8) = 0

11653 18:21:19.145406 <... shmget resumed> ) = -1 ENOSYS (Function not implemented)

11649 18:21:19.145450 --- SIGCHLD (Child exited) @ 0 (0) ---

11653 18:21:19.145594 write(2, "Can\'t get shared memory. (Functi"..., 60 <unfinished ...>

11649 18:21:19.145660 waitpid(-1,  <unfinished ...>

11653 18:21:19.145916 <... write resumed> ) = 60

11649 18:21:19.145958 <... waitpid resumed> 0x58c00ed8, WNOHANG) = -1 ECHILD (No child processes)

11653 18:21:19.146088 exit_group(-1)    = ?

11649 18:21:19.146133 sigreturn()       = ? (mask now [])

```

----------

## Hu

 *Unstable wrote:*   

> Looking at that Strace log I here is the function call that is failing (From what i can tell).
> 
> ```
> 
> 11653 18:21:19.144931 setsid( <unfinished ...>
> ...

 

Yes, that looks to be the cause of the failure.  shmget is for acquiring shared memory.  Did you enable SYSVIPC in your kernel configuration?  If you are not sure, post the output of zgrep -E '^[^#]' /proc/config.gz while booted into the hardened kernel.

----------

## Unstable

 *Hu wrote:*   

> 
> 
> Yes, that looks to be the cause of the failure.  shmget is for acquiring shared memory.  Did you enable SYSVIPC in your kernel configuration?  If you are not sure, post the output of zgrep -E '^[^#]' /proc/config.gz while booted into the hardened kernel.

 

No i didn't and am in the process of doing this.  I've been trying to remove anything from the kernel that is not needed to optimise the system as much as possible as it is a server. So no need for USB, or anything like that.

Thanks for the help and i will be back in a minute with the latest kernel results.

----------

## Unstable

Thanks for the help.  Enabling System V IPC Fixed the problem.

----------

