Modify

Opened 10 years ago

Closed 10 years ago

Last modified 4 years ago

#2627 closed defect (fixed)

awk always experiences segmentation fault on adm5120 target

Reported by: abates@… Owned by: florian
Priority: normal Milestone: Barrier Breaker 14.07
Component: base system Version:
Keywords: awk segmentation fault Cc:

Description

platform: mikrotik rb150, adm5120-le

openwrt version: kamikaze revision 9461

problem: Whenever awk is called it immediately fails with a segmentation fault. I have not been able to use any combination of arguments on the command line to make it work. There is no other error message then the segmentation fault and no core file (perhaps I need to compile differently to get a core file?).

Attachments (0)

Change History (6)

comment:1 Changed 10 years ago by florian

  • Owner changed from developers to florian
  • Status changed from new to assigned

Please strace an awk call.

comment:2 Changed 10 years ago by abates@…

root@OpenWrt:/$ strace awk
execve("/usr/bin/awk", ["awk"], [/* 8 vars */]) = 0
svr4_syscall()                          = -1 ERRNO_4090 (Unknown error 4090)
stat("/etc/ld.so.cache", 0x7fb2fb00)    = -1 ENOENT (No such file or directory)
open("/lib/libcrypt.so.0", O_RDONLY)    = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=10674, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaf000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0 \5\0\000"..., 4096) = 4096
old_mmap(NULL, 344064, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaee000
old_mmap(0x2aaee000, 10600, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2aaee000
old_mmap(0x2ab30000, 2482, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x2ab30000
old_mmap(0x2ab31000, 69280, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ab31000
close(3)                                = 0
munmap(0x2aaaf000, 4096)                = 0
open("/lib/libm.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=30354, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaf000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0000\f\0"..., 4096) = 4096
old_mmap(NULL, 294912, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ab42000
old_mmap(0x2ab42000, 30188, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2ab42000
old_mmap(0x2ab89000, 1682, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x7000) = 0x2ab89000
close(3)                                = 0
munmap(0x2aaaf000, 4096)                = 0
open("/lib/libgcc_s.so.1", O_RDONLY)    = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=59178, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaf000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\0\30\0"..., 4096) = 4096
old_mmap(NULL, 323584, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ab8a000
old_mmap(0x2ab8a000, 56996, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2ab8a000
old_mmap(0x2abd8000, 1834, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xe000) = 0x2abd8000
close(3)                                = 0
munmap(0x2aaaf000, 4096)                = 0
open("/lib/libc.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=426495, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaf000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0 \272\0"..., 4096) = 4096
old_mmap(NULL, 708608, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2abd9000
old_mmap(0x2abd9000, 419572, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2abd9000
old_mmap(0x2ac80000, 4607, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x67000) = 0x2ac80000
old_mmap(0x2ac82000, 15768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ac82000
close(3)                                = 0
munmap(0x2aaaf000, 4096)                = 0
open("/lib/libc.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=426495, ...}) = 0
close(3)                                = 0
open("/lib/libc.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=426495, ...}) = 0
close(3)                                = 0
open("/lib/libc.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=426495, ...}) = 0
close(3)                                = 0
ioctl(0, TIOCNXCL, {B115200 opost isig icanon echo ...}) = 0
ioctl(1, TIOCNXCL, {B115200 opost isig icanon echo ...}) = 0
getuid()                                = 0
brk(0)                                  = 0x4f1000
brk(0x4f2000)                           = 0x4f2000
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Process 2064 detached
root@OpenWrt:/$ 

comment:3 Changed 10 years ago by anonymous

I confirm the same error on r9462 flashed in asus wl500g (32MB ram).
Whole system is very broken without awk. Also busybox vi fails by SIGSEGV.

The offending command is in busybox-1.7.2/editors/awk.c: 490, macro INIT_G(),
write to G.next_tokenltclass.
Busybox 1.4.2 works just fine.

comment:4 Changed 10 years ago by anonymous

I'm having the same issue with r9509 on a wrt54gl

comment:5 Changed 10 years ago by florian

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

Should be fixed with the busybox upgrade.

comment:6 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.