QuarkContainer / Quark

A secure container runtime with CRI/OCI interface
Apache License 2.0
317 stars 47 forks source link

Wrong behavior in splice syscall #1346

Open mhomidi opened 4 weeks ago

mhomidi commented 4 weeks ago

Hi all,

Actually I am facing an issue with splice syscall. When I run this testcase, what it expects in line 823 is that splice returns an EINTR. It expects splice gets blocked and receives interrupt generated in line 819. When I checked the code of Quark, it spins in this loop. Actually, it always get EWOULDBLOCK error which is correct but it does not block and get stuck in this loop. So the signal does not work for this thread.

In this testcase, Quark also does not work correctly. the task running this syscall gets blocked in here. I tried to figure out who get this lock but I could not find anything.


Update

Just for second issue, quark lock implementation seems to be wrong. What I am seeing in this implementation, Quark does not care about the task acquiring the lock. In such case, when we a task get a lock, it can not get it again which cause a deadlock in the second testcase. I think we need to have an extra layer on the lock we have now and check it.

chl337 commented 4 weeks ago

Just for second issue, quark lock implementation seems to be wrong. What I am seeing in this implementation,

The link above is broken!

mhomidi commented 3 weeks ago

Link is updated now.