Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 5 Nov 2012 16:28:33 +0100
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: A few issues on MIPS

* Paul Schutte <sjpschutte@...il.com> [2012-11-05 16:34:47 +0200]:
> open("/root/file", O_RDWR|O_CREAT|O_LARGEFILE, 0644) = 3
> fcntl64(3, F_GETFD)                     = 0
> fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
> fstat64(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
> _llseek(3, 0, [0], SEEK_SET)            = 0
> read(3, "", 100)                        = 0
...
> writev(1, [{"sqlite> ", 8}, {NULL, 0}], 2sqlite> ) = 8
> readv(0, [{"", 0},
> {".schema\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1024}], 2)
> = 8
> brk(0x4d6000)                           = 0x4d6000
> fcntl64(3, 0xd /* F_??? */, 0x7fc84210) = -1 EINVAL (Invalid argument)
> writev(2, [{"Error: disk I/O error\n", 22}, {NULL, 0}], 2Error: disk I/O
> error
> ) = 22
> writev(1, [{"sqlite> ", 8}, {NULL, 0}], 2sqlite> ) = 8
> 

i guess the fcntl arguments are broken on mips

> When using uclibc I do not get the error:
> 
> write(1, "sqlite> ", 8sqlite> )                 = 8
> read(0,".schema\n", 4096)              = 8
> brk(0x6d1000)                           = 0x6d1000
> fcntl64(3, F_SETLK64, {type=F_RDLCK, whence=SEEK_SET, start=1073741824,
> len=1}, 0x7ff28fd0) = 0

one should check the kernel vs musl definition of F_SETLK64

> If I compile it on amd64/i386 using musl and the same procedure, I also do
> not get the problem.
> 
> writev(1, [{"sqlite> ", 8}, {NULL, 0}], 2sqlite> ) = 8
> readv(0, [{"", 0},
> {".schema\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1024}], 2)
> = 8
> brk(0x1d41000)                          = 0x1d41000
> fcntl(3, F_SETLK, {type=F_RDLCK, whence=SEEK_SET, start=1073741824, len=1})
> = 0


> I also statically compiled mongoose-3.3 and get a different problem there.
> (Port 8080 is available):
> 
> 
> execve("./mongoose", ["./mongoose"], [/* 28 vars */]) = 0
> open("./mongoose.conf", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or
> directory)
> rt_sigprocmask(SIG_UNBLOCK, [RT_1 RT_2], NULL, 16) = 0
> set_thread_area(0x448974)               = 0
> set_tid_address(0x4418e4)               = 16807
> rt_sigaction(SIGTERM, {0x14000000, [RT_68 RT_69 RT_71 RT_72 RT_80 RT_82
> RT_87], 0x4002f0 /* SA_??? */}, {SIG_DFL, [RT_68 RT_69 RT_71 RT_72 RT_80
> RT_82 RT_87], 0}, 16) = 0
> rt_sigaction(SIGINT, {0x14000000, [RT_68 RT_69 RT_71 RT_72 RT_80 RT_82
> RT_87], 0x4002f0 /* SA_??? */}, {SIG_DFL, [RT_68 RT_69 RT_71 RT_72 RT_80
> RT_82 RT_87], 0}, 16) = 0
> brk(0)                                  = 0x442000
> brk(0x443000)                           = 0x443000
> socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 3
> setsockopt(3, SO_DEBUG, 2, [1], 4)      = -1 ENOPROTOOPT (Protocol not
> available)

seems to be similar issue: SO_DEBUG is probably bogus

> On a different architecture (amd64) it works:
> 
> execve("./mongoose", ["./mongoose"], [/* 39 vars */]) = 0
> rt_sigprocmask(SIG_UNBLOCK, [RT_1 RT_2], NULL, 8) = 0
> arch_prctl(ARCH_SET_FS, 0x621960)       = 0
> set_tid_address(0x621990)               = 9789
> open("./mongoose.conf", O_RDONLY)       = -1 ENOENT (No such file or
> directory)
> rt_sigaction(SIGTERM, {0x4001f4, [], SA_RESTORER|SA_RESTART, 0x418ea8},
> {SIG_DFL, [], 0}, 8) = 0
> rt_sigaction(SIGINT, {0x4001f4, [], SA_RESTORER|SA_RESTART, 0x418ea8},
> {SIG_DFL, [], 0}, 8) = 0
> brk(0)                                  = 0x1aab000
> brk(0x1aac000)                          = 0x1aac000
> socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 3
> setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0


SOL_SOCKET is probably wrongly defined for mips

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.