Modify

Opened 8 years ago

Closed 7 years ago

Last modified 4 years ago

#6934 closed defect (wontfix)

ntpclient segfaulting on ar71xx in trunk

Reported by: anonymous Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: Cc:

Description

I'm getting the following segfault on trunk:

execve("/usr/sbin/ntpclient", ["ntpclient"], [/* 7 vars */]) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaad000
stat("/etc/ld.so.cache", 0x7ff96af0)    = -1 ENOENT (No such file or directory)
open("/lib/librt.so.0", O_RDONLY)       = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=417, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\10\0\0\0\1\0\0\0004\0\0\0004"..., 4096) = 417
old_mmap(NULL, 65536, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aabe000
close(3)                                = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Segmentation fault

Device is a d-link dir-615 rev c1

I'm attaching my .config

Attachments (1)

config.ntpclient-segfault (101.9 KB) - added by Pat Erley <pat@…> 8 years ago.

Download all attachments as: .zip

Change History (8)

Changed 8 years ago by Pat Erley <pat@…>

comment:1 Changed 8 years ago by Pat Erley <pat@…>

Additional 'interesting' info that may be relevant:

root@FooBarCafeWrt:/usr/sbin# ldd ntpclient
Segmentation fault
root@FooBarCafeWrt:/usr/sbin# strace ldd ntpclient
execve("/usr/bin/ldd", ["ldd", "ntpclient"], [/* 8 vars */]) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaad000
stat("/etc/ld.so.cache", 0x7fcf8340)    = -1 ENOENT (No such file or directory)
open("/lib/libgcc_s.so.1", O_RDONLY)    = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=48320, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\10\0\0\0\1\0\0\20\360\0\0\0004"..., 4096) = 4096
old_mmap(NULL, 114688, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aabe000
old_mmap(0x2aabe000, 45460, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2aabe000
old_mmap(0x2aad9000, 2312, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xb000) = 0x2aad9000
close(3)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/lib/libc.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=274896, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\10\0\0\0\1\0\0r\260\0\0\0004"..., 4096) = 4096
old_mmap(NULL, 356352, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aada000
old_mmap(0x2aada000, 269088, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2aada000
old_mmap(0x2ab2c000, 3604, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x42000) = 0x2ab2c000
old_mmap(0x2ab2d000, 15796, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ab2d000
close(3)                                = 0
munmap(0x2aaae000, 4096)                = 0
stat("/lib/ld-uClibc.so.0", {st_mode=S_IFREG|0755, st_size=22640, ...}) = 0
mprotect(0x2aabc000, 4096, PROT_READ)   = 0
ioctl(0, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0
stat("/etc/ld.so.cache", 0x7fcf8558)    = -1 ENOENT (No such file or directory)
write(2, "ldd: can't open cache '", 23ldd: can't open cache ') = 23
write(2, "/etc/ld.so.cache", 16/etc/ld.so.cache)        = 16
write(2, "'\n", 2'
)                      = 2
brk(0)                                  = 0x413000
brk(0x414000)                           = 0x414000
open("ntpclient", O_RDONLY)             = 3
ioctl(3, TIOCNXCL, 0x7fcf8388)          = -1 ENOTTY (Inappropriate ioctl for device)
brk(0x415000)                           = 0x415000
fstat(3, {st_mode=S_IFREG|0755, st_size=27544, ...}) = 0
old_mmap(NULL, 27544, PROT_READ|PROT_WRITE, MAP_PRIVATE, 3, 0) = 0x2aaae000
close(3)                                = 0
stat("/lib/ld-uClibc.so.0", {st_mode=S_IFREG|0755, st_size=22640, ...}) = 0
fork()                                  = 1459
wait4(1459, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGSEGV}], 0, NULL) = 1459
--- SIGCHLD (Child exited) @ 0 (0) ---
stat("librt.so.0", 0x7fcf83c8)          = -1 ENOENT (No such file or directory)
stat("/lib/librt.so.0", {st_mode=S_IFREG|0644, st_size=144, ...}) = 0
stat("libgcc_s.so.1", 0x7fcf83c8)       = -1 ENOENT (No such file or directory)
stat("/lib/libgcc_s.so.1", {st_mode=S_IFREG|0644, st_size=48320, ...}) = 0
stat("libc.so.0", 0x7fcf83c8)           = -1 ENOENT (No such file or directory)
stat("/lib/libc.so.0", {st_mode=S_IFREG|0644, st_size=274896, ...}) = 0
write(1, "checking sub-depends for '/lib/l"..., 43checking sub-depends for '/lib/librt.so.0'
) = 43
open("/lib/librt.so.0", O_RDONLY)       = 3
ioctl(3, TIOCNXCL, 0x7fcf8388)          = -1 ENOTTY (Inappropriate ioctl for device)
fstat(3, {st_mode=S_IFREG|0644, st_size=144, ...}) = 0
old_mmap(NULL, 144, PROT_READ|PROT_WRITE, MAP_PRIVATE, 3, 0) = 0x2aab6000
close(3)                                = 0
write(1, "checking sub-depends for '/lib/l"..., 46checking sub-depends for '/lib/libgcc_s.so.1'
) = 46
open("/lib/libgcc_s.so.1", O_RDONLY)    = 3
ioctl(3, TIOCNXCL, 0x7fcf8388)          = -1 ENOTTY (Inappropriate ioctl for device)
fstat(3, {st_mode=S_IFREG|0644, st_size=48320, ...}) = 0
old_mmap(NULL, 48320, PROT_READ|PROT_WRITE, MAP_PRIVATE, 3, 0) = 0x2ab32000
close(3)                                = 0
write(1, "checking sub-depends for '/lib/l"..., 42checking sub-depends for '/lib/libc.so.0'
) = 42
open("/lib/libc.so.0", O_RDONLY)        = 3
ioctl(3, TIOCNXCL, 0x7fcf8388)          = -1 ENOTTY (Inappropriate ioctl for device)
fstat(3, {st_mode=S_IFREG|0644, st_size=274896, ...}) = 0
old_mmap(NULL, 274896, PROT_READ|PROT_WRITE, MAP_PRIVATE, 3, 0) = 0x2ab3e000
close(3)                                = 0
stat("ld-uClibc.so.0", 0x7fcf83c8)      = -1 ENOENT (No such file or directory)
stat("/lib/ld-uClibc.so.0", {st_mode=S_IFREG|0755, st_size=22640, ...}) = 0
write(1, "checking sub-depends for '/lib/l"..., 47checking sub-depends for '/lib/ld-uClibc.so.0'
) = 47
open("/lib/ld-uClibc.so.0", O_RDONLY)   = 3
ioctl(3, TIOCNXCL, 0x7fcf8388)          = -1 ENOTTY (Inappropriate ioctl for device)
brk(0x416000)                           = 0x416000
fstat(3, {st_mode=S_IFREG|0755, st_size=22640, ...}) = 0
old_mmap(NULL, 22640, PROT_READ|PROT_WRITE, MAP_PRIVATE, 3, 0) = 0x2ab82000
close(3)                                = 0
write(1, "\tlibrt.so.0 => /lib/librt.so.0 ("..., 44     librt.so.0 => /lib/librt.so.0 (0x00000000)
) = 44
write(1, "\tlibgcc_s.so.1 => /lib/libgcc_s."..., 50     libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00000000)
) = 50
write(1, "\tlibc.so.0 => /lib/libc.so.0 (0x"..., 42     libc.so.0 => /lib/libc.so.0 (0x00000000)
) = 42
write(1, "\tld-uClibc.so.0 => /lib/ld-uClib"..., 52     ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x00000000)
) = 52
write(1, "\tnot a dynamic executable\n", 26     not a dynamic executable
) = 26
exit(0)                                 = ?

it appears there's some larger problem at hand here.

comment:2 Changed 8 years ago by Pat Erley <pat@…>

Ok, I was able to make changes to my .config and get it to not segfault... looks like it was the 'strip' option causing it. Is there interest in the working .config to do a diff to find the root of the problem, or should the ticket be closed?

comment:3 Changed 8 years ago by thepeople

  • Resolution set to fixed
  • Status changed from new to closed

ntpclient works fine for me on the latest trunk so I am going to close this, if it continues to be an issue please reopen it.

comment:4 Changed 8 years ago by anonymous

Also, there is now rdate under LuCI -> System -> System. No need for ntpclient package.

comment:5 Changed 8 years ago by bart.vandermeerssche@…

  • Resolution fixed deleted
  • Status changed from closed to reopened

I'm seeing the same segfault when using ntpclient on Backfire 10.03 (Atheros AR2317) with:
CONFIG_USE_SSTRIP=y
CONFIG_STRIP_KERNEL_EXPORTS=y

root@OpenWrt:/# ntpclient
Segmentation fault

Disabling
[ ] Strip unnecessary functions from libraries
[ ] Strip unnecessary exports from the kernel image
gets rid of the segfault.

Cheers,
Bart.

comment:6 Changed 7 years ago by jow

  • Resolution set to wontfix
  • Status changed from reopened to closed

Segfaults may happen with library stripping, its not perfect and you should know what to do when using it.

comment:7 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.