mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Paul Schutte <sjpschutte@gmail.com>
To: musl@lists.openwall.com
Subject: Re: A few issues on MIPS
Date: Mon, 5 Nov 2012 19:27:44 +0200	[thread overview]
Message-ID: <CAKHv7pjTgPcxEu0mU1z_Jw2B8tP2=FkCnx6fMu2G_rnaredCGA@mail.gmail.com> (raw)
In-Reply-To: <20121105152832.GV24157@port70.net>

[-- Attachment #1: Type: text/plain, Size: 3983 bytes --]

Thanks for the reply.

I suspected something like you mention and therefore I made sure that I
installed the correct kernel headers before I compiled musl or any of the
other software.

It did not seem to make any difference.

 Regards
Paul

On Mon, Nov 5, 2012 at 5:28 PM, Szabolcs Nagy <nsz@port70.net> wrote:

> * Paul Schutte <sjpschutte@gmail.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
>
>

[-- Attachment #2: Type: text/html, Size: 5036 bytes --]

  reply	other threads:[~2012-11-05 17:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-05 14:34 Paul Schutte
2012-11-05 15:28 ` Szabolcs Nagy
2012-11-05 17:27   ` Paul Schutte [this message]
2012-11-05 17:31     ` Rich Felker
2012-11-05 18:11       ` Paul Schutte
2012-11-05 18:46       ` sjpschutte
2012-11-05 18:50         ` Szabolcs Nagy
2012-11-05 19:39         ` Rich Felker
2012-11-05 22:56           ` Paul Schutte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKHv7pjTgPcxEu0mU1z_Jw2B8tP2=FkCnx6fMu2G_rnaredCGA@mail.gmail.com' \
    --to=sjpschutte@gmail.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).