Modify

Opened 4 years ago

Closed 4 years ago

#15807 closed defect (fixed)

iwinfo crashes with SIGBUS on DIR-645

Reported by: anonymous Owned by: developers
Priority: response-needed Milestone: Chaos Calmer 15.05
Component: packages Version: Trunk
Keywords: Cc:

Description

Output:
wlan0 ESSID: "*"

Access Point: :::::
Mode: Master Channel: 11 (2.462 GHz)

Bus error

Attachments (0)

Change History (5)

comment:1 Changed 4 years ago by jow

  • Priority changed from normal to response-needed

What OpenWrt release / revision? Whats the current wireless configuration?
Please attach the output of "strace iwinfo" after installing the strace package.

comment:2 Changed 4 years ago by anonymous

execve("/usr/bin/iwinfo", ["iwinfo", "wlan0", "txpowerlist"], [/* 11 vars */]) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x7733b000
stat("/etc/ld.so.cache", 0x7fc5aad0)    = -1 ENOENT (No such file or directory)
open("/lib/libiwinfo.so", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("/usr/lib/libiwinfo.so", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=50859, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x7733a000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\360\35\0\0004\0\0\0"..., 4096) = 4096
mmap(NULL, 135168, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x77305000
mmap(0x77305000, 49172, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x77305000
mmap(0x77321000, 1707, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xc000) = 0x77321000
mmap(0x77322000, 13184, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x77322000
close(3)                                = 0
munmap(0x7733a000, 4096)                = 0
open("/lib/libnl-tiny.so", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib/libnl-tiny.so", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=29691, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x7733a000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\220\31\0\0004\0\0\0"..., 4096) = 4096
mmap(NULL, 98304, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x772ed000
mmap(0x772ed000, 27876, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x772ed000
mmap(0x77304000, 1019, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x7000) = 0x77304000
close(3)                                = 0
munmap(0x7733a000, 4096)                = 0
open("/lib/libgcc_s.so.1", O_RDONLY)    = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=78199, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x7733a000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0 7\0\0004\0\0\0"..., 4096) = 4096
mmap(NULL, 147456, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x772c9000
mmap(0x772c9000, 77740, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x772c9000
mmap(0x772ec000, 375, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x13000) = 0x772ec000
close(3)                                = 0
munmap(0x7733a000, 4096)                = 0
open("/lib/libc.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=355488, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x7733a000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\260\234\0\0004\0\0\0"..., 4096) = 4096
mmap(NULL, 442368, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7725d000
mmap(0x7725d000, 350704, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x7725d000
mmap(0x772c2000, 7328, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x55000) = 0x772c2000
mmap(0x772c4000, 17492, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x772c4000
close(3)                                = 0
munmap(0x7733a000, 4096)                = 0
open("/lib/libnl-tiny.so", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib/libnl-tiny.so", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=29691, ...}) = 0
close(3)                                = 0
open("/lib/libgcc_s.so.1", O_RDONLY)    = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=78199, ...}) = 0
close(3)                                = 0
open("/lib/libc.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=355488, ...}) = 0
close(3)                                = 0
open("/lib/libgcc_s.so.1", O_RDONLY)    = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=78199, ...}) = 0
close(3)                                = 0
open("/lib/libc.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=355488, ...}) = 0
close(3)                                = 0
open("/lib/libc.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=355488, ...}) = 0
close(3)                                = 0
stat("/lib/ld-uClibc.so.0", {st_mode=S_IFREG|0755, st_size=28966, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x7733a000
set_thread_area(0x77341440)             = 0
mprotect(0x772c2000, 4096, PROT_READ)   = 0
mprotect(0x7733c000, 4096, PROT_READ)   = 0
ioctl(0, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0
brk(0)                                  = 0x865000
brk(0x866000)                           = 0x866000
time(NULL)                              = 1399672790
getpid()                                = 2407
socket(PF_NETLINK, SOCK_RAW, 16)        = 3
setsockopt(3, SOL_SOCKET, SO_SNDBUF, [32768], 4) = 0
setsockopt(3, SOL_SOCKET, SO_RCVBUF, [32768], 4) = 0
bind(3, {sa_family=AF_NETLINK, pid=2407, groups=00000000}, 12) = 0
getsockname(3, {sa_family=AF_NETLINK, pid=2407, groups=00000000}, [12]) = 0
fcntl64(3, F_GETFD)                     = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
brk(0x867000)                           = 0x867000
sendmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\24\0\0\0\20\0\5\3\326OmSg\t\0\0\3\1\0\0", 20}], msg_controllen=0, msg_flags=0}, 0) = 20
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"t\0\0\0\20\0\2\0\326OmSg\t\0\0\1\2\0\0\v\0\2\0nlctrl\0\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 2300
brk(0x868000)                           = 0x868000
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\24\0\0\0\3\0\2\0\326OmSg\t\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 20
socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 4
ioctl(4, SIOCGIFINDEX, {ifr_name="wlan0", ifr_index=13}) = 0
close(4)                                = 0
sendmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\34\0\0\0\23\0\5\0\327OmSg\t\0\0\1\0\0\0\10\0\3\0\r\0\0\0", 28}], msg_controllen=0, msg_flags=0}, 0) = 28
brk(0x869000)                           = 0x869000
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"8\16\0\0\23\0\0\0\327OmSg\t\0\0\3\1\0\0\10\0\1\0\0\0\0\0\t\0\2\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 3640
brk(0x86a000)                           = 0x86a000
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"$\0\0\0\2\0\0\0\327OmSg\t\0\0\0\0\0\0\34\0\0\0\23\0\5\0\327OmS"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 36
socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 4
ioctl(4, SIOCGIFINDEX, {ifr_name="wlan0", ifr_index=13}) = 0
close(4)                                = 0
sendmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\34\0\0\0\23\0\5\0\330OmSg\t\0\0\5\0\0\0\10\0\3\0\r\0\0\0", 28}], msg_controllen=0, msg_flags=0}, 0) = 28
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\204\0\0\0\23\0\0\0\330OmSg\t\0\0\7\1\0\0\10\0\3\0\r\0\0\0\n\0\4\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 132
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"$\0\0\0\2\0\0\0\330OmSg\t\0\0\0\0\0\0\34\0\0\0\23\0\5\0\330OmS"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 36
socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 4
ioctl(4, SIOCGIFINDEX, {ifr_name="wlan0", ifr_index=13}) = 0
close(4)                                = 0
sendmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\34\0\0\0\23\0\5\0\331OmSg\t\0\0\1\0\0\0\10\0\3\0\r\0\0\0", 28}], msg_controllen=0, msg_flags=0}, 0) = 28
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"8\16\0\0\23\0\0\0\331OmSg\t\0\0\3\1\0\0\10\0\1\0\0\0\0\0\t\0\2\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 3640
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"$\0\0\0\2\0\0\0\331OmSg\t\0\0\0\0\0\0\34\0\0\0\23\0\5\0\331OmS"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 36
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
fcntl64(4, F_GETFD)                     = 0
fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
ioctl(4, SIOCGIWTXPOW, 0x7fc54ce0)      = 0
open("/sys/class/net/wlan0/device/vendor", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/sys/class/net/wlan0/device/device", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/sys/class/net/wlan0/device/subsystem_device", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/sys/class/net/wlan0/device/subsystem_vendor", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/proc/mtd", O_RDONLY)             = 5
ioctl(5, TIOCNXCL, 0x7fc54b38)          = -1 ENOTTY (Inappropriate ioctl for device)
read(5, "dev:    size   erasesize  name\nm"..., 4096) = 305
close(5)                                = 0
open("/dev/mtdblock2", O_RDONLY)        = 5
mmap(NULL, 65536, PROT_READ, MAP_PRIVATE|MAP_LOCKED, 5, 0) = 0x7724c000
--- SIGBUS {si_signo=SIGBUS, si_code=BUS_ADRERR, si_addr=0x7725b000} ---
+++ killed by SIGBUS +++
Bus error

comment:3 Changed 4 years ago by anonymous

This is on OpenWRT BARRIER BREAKER (Bleeding Edge, r40746)

comment:4 Changed 4 years ago by anonymous

it looks like file "iwinfo_utils.c" line 182 have problem.
should get mtd size. but get erase size. cause mmap bus error.

fscanf(mtd, "mtd%d: %*x %x %127s", &off, &len, buf)
should be
fscanf(mtd, "mtd%d: %x %*x %127s", &off, &len, buf)

the mtd format is
dev: size erasesize name
mtd0: 00030000 00010000 "uboot"

comment:5 Changed 4 years ago by nbd

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

fixed in r41675

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.