#106 Wine IPC broken by file delete

v1.9.1
closed-fixed
nobody
Filesystem (49)
5
2008-10-21
2005-12-12
John Hughes
No

On a 1.9.2 (from CVS) kernel, Debian sid (unstable)

Wine crashes with the bizarre error:

Protocol error: process 0x8082cf0: sendmsg: No such
file or directory

On the console I see:

reop_export_path: Can't export unlinked file
/cluster/node5/tmp/.wine-john/server-812-5dcd2/anonmap.Q0XgZn
(deleted)

strace of the wine session shows:

331200 bind(5, {sa_family=AF_FILE, path="socket"}, 9) = 0
331197 recvmsg(3, <unfinished ...>
331200 sendmsg(15, {msg_name(0)=NULL,
msg_iov(1)=[{"\0\0\0\0", 4}], msg_controllen=16,
msg_control=0x807d298, , msg_flags=0}, 0) = 4
331197 <... recvmsg resumed> {msg_name(0)=NULL,
msg_iov(1)=[{"\0\0\0\0", 4}], msg_controllen=16,
msg_control=0xbfffd4f4, , msg_flags=0}, 0) = 4
[...]
331197 recvmsg(3, {msg_name(0)=NULL,
msg_iov(1)=[{"\24\0\0\0", 4}], msg_controllen=16,
msg_control=0xbfffbee0, , msg_flags=0}, 0) = 4
331200 open("anonmap.Q0XgZn",
O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600) = 22
331200 unlink("anonmap.Q0XgZn") = 0
331200 sendmsg(15, {msg_name(0)=NULL,
msg_iov(1)=[{"\24\0\0\0", 4}], msg_controllen=16,
msg_control=0x807d298, , msg_flags=0}, 0) = -1 ENOENT
(No such file or directory)

So the two processes are happily chatting away with
sendmsg and recvmesg until one of them creates and
deletes a file at which point the system seems to think
that the socket has gone away and sendmesg gets an
ENOENT (which is not even a documented error for sendmesg).

Discussion

  • John Hughes
    John Hughes
    2005-12-14

    Logged In: YES
    user_id=166336

    So, this is almost certainly bug #1201723, i.e. wine has
    opened a file, unlinked it and is now using sendmsg to send
    the fd to another process.

    (In this particular case the other process happens to be on
    the same node, but maybe cfs doesn't know that).

     
  • Niklas
    Niklas
    2005-12-15

    Logged In: YES
    user_id=1390928

    Hi,

    decided to test the suggested improvements in this thread:
    http://sourceforge.net/mailarchive/forum.php?thread_id=9216174&forum_id=791
    ie. removing the #ifdef SKIP and recompiling the kernel, it
    didnt help at least for my application. If i try to migrate
    it, i still get:
    reop_export_path: cant export unlinked file.

    Still trying to experiment with some things.

    br,
    niklas

     
  • Logged In: NO

    This problem seems to be fixed since 12/24/2005. Not
    getting the errors anymore while using Wine.

     
  • John Hughes
    John Hughes
    2007-02-16

    Logged In: YES
    user_id=166336
    Originator: YES

    Fixed by Roger some time ago.

     
  • John Hughes
    John Hughes
    2007-02-16

    • status: open --> closed
     
  • John Hughes
    John Hughes
    2008-10-21

    • status: closed --> closed-fixed