From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2238 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: A few issues on MIPS Date: Mon, 5 Nov 2012 16:28:33 +0100 Message-ID: <20121105152832.GV24157@port70.net> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1352129329 9007 80.91.229.3 (5 Nov 2012 15:28:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Nov 2012 15:28:49 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2239-gllmg-musl=m.gmane.org@lists.openwall.com Mon Nov 05 16:28:59 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1TVObe-0005Ci-Br for gllmg-musl@plane.gmane.org; Mon, 05 Nov 2012 16:28:54 +0100 Original-Received: (qmail 11487 invoked by uid 550); 5 Nov 2012 15:28:44 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 11479 invoked from network); 5 Nov 2012 15:28:44 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2238 Archived-At: * Paul Schutte [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