Closed moosejackson closed 7 years ago
The problem was, that I had to update Ubuntu to 16.04 using
do-release-upgrade
Now it seems, that semaphors could work
Semaphores, I think, still don't work in the fakeroot program, which still needs to be recompiled with the tcp flag on an arch userspace.
I was able to generate an strace of it failing here while using makepkg:
(I had to use an old version of strace because the latest version fails on an unimplemented ptrace option)
It seems like it's failing when it runs faked
, so I straced running that directly:
@therealkenc support is now there partially, that's why postgres works I thought
The Creator's update has support for SysV semaphores and shared memory. Closing this out as fixed in the creator's update, but please let us know if you hit any issues.
@stehufntdev my strace is from CU. The problem should happen in all versions of fakeroot compiled with the default sysvipc mechanism rather than tcp.
@fpqc - If you post a strace -ff faked [however you do it] 2> faked.strace
I'll take a look. The one you posted doesn't have any fails to explain the write(2, "fakeroot, while creating message"..., 68
message. Actually it doesn't even contain a clone()
or exec()
, which could be an ptrace()
thing if you already ran it with -ff
. I have seen this before, see for example #1306 (message); although the guy never followed up on Adam's question regarding strace -ff
.
So you likely have a mulimode failure here. It is not clear where that "Function not implemented...This may be due to a lack of SYSV IPC support"
error is coming from. It could be SysV IPC. It could be a bad guess on faked
's part. If you are still splashing around in Arch-land, best thing to do is sit tight until #555 and #1878 (message) to flip to fixedinsiderbuilds. #1878 hasn't even made it to bug yet.
FWIW, the problem with faked
does look like plain old unimplemented surface. The bonus is that the syscall fail does not turn up in strace
. I have seen this before when I did #1530. For some reason I think we might have lost ENOSYS
traces along the way. Anyway, test case below. This is on 16184, stock WSL 16.04.2 userspace. This has nothing to do with Arch or the rest.
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
#include <sys/msg.h>
#include <string.h>
#include <errno.h>
#include <stdio.h>
int main(int argc, const char * argv[])
{
char buf[1024];
int msg_get, msg_key = 42;
msg_get = msgget(msg_key,IPC_CREAT|0600);
if (msg_get == -1) {
strerror_r(errno, buf, sizeof(buf));
printf("msgget: %s\n", buf);
}
return 0;
}
strace:
...usual stuff
munmap(0x7fdc1a8ac000, 147083) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
brk(NULL) = 0x203e000
brk(0x205f000) = 0x205f000
write(1, "msgget: Function not implemented"..., 33) = 33
exit_group(0) = ?
+++ exited with 0 +++
yeah, I tried it on Ubuntu too, thought I mentioned that
@fpqc, can you please share out your repro? Locally when I run ipcs
, I get different output from what you posted above:
root@stehuf-test:/# ipcs
------ Message Queues -------- key msqid owner perms used-bytes messages
------ Shared Memory Segments -------- key shmid owner perms bytes nattch status
------ Semaphore Arrays -------- key semid owner perms nsems
@stehufntdev I didn't run ipcs, I ran fakeroot/faked. @moosejackson ran ipcs.
Sorry for the mix-up there, when I run fakeroot locally I get the failure below which is due to missing msgqueue support not semaphones (i.e. MSGGET, MSGCTL, ...). Are you seeing a different failure?
root@stehuf-test:/# fakeroot fakeroot, while creating message channels: Function not implemented This may be due to a lack of SYSV IPC support. fakeroot: error while starting the `faked' daemon. kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
System V semaphores and shared memory were implemented during Creators Update but message queues were not.
Ah, there we go. Mystery solved.
When I've tried to run fakeroot, I got the same message as @stehufntdev mentioned. I had some problems with using semaphores in WSL(not sure where was exactly the problem), so I've installed Fedora to virtual machine and did all I needed there. I had to use semaphores and shared memory for my school project (synchronization of processes) and it is already done :)
Semaphores are still not working in build 15063.11. Running ipcs in bash:
According to https://wpdev.uservoice.com semaphores should be working.