SingleApplication icon indicating copy to clipboard operation
SingleApplication copied to clipboard

Shared memory problem on armhf

Open pbek opened this issue 6 years ago • 20 comments

I've got a weird case on a armhf system. (see https://github.com/pbek/QOwnNotes/issues/1089) I'm not sure if it is the setup of the user or a problem with armhf in general.

Critical: SingleApplication: Unable to attach to shared memory block. ((null):0, (null))
Critical: "QSharedMemoryPrivate::initKey: unable to set key on lock" ((null):0, (null))

pbek avatar Dec 14 '18 15:12 pbek

Hey mate, I'm really busy right now. The earlierst I can look into this is Monday. But if for some reason I forget drop me a line on my email.

itay-grudev avatar Dec 14 '18 15:12 itay-grudev

No problem. I'm not sure you can do anything about it. Have a busy weekend. :smile:

pbek avatar Dec 14 '18 15:12 pbek

It looks like a Qt problem though.

itay-grudev avatar Dec 14 '18 15:12 itay-grudev

Yes, everything seems to be legitimate in https://github.com/itay-grudev/SingleApplication/blob/2fac2a38040e8996d2a91e8f043dcfb924893d5b/singleapplication.cpp#L69-L74

pbek avatar Dec 14 '18 15:12 pbek

If you have time, can you create an issue in the Qt bug tracker. Somebody there might know the cause of the problem.

itay-grudev avatar Dec 14 '18 15:12 itay-grudev

Was this caused on a Raspberry Pi 3?

itay-grudev avatar Dec 14 '18 15:12 itay-grudev

Was this caused on a Raspberry Pi 3?

No, a container: linux ubuntu 16.04 container

pbek avatar Dec 14 '18 15:12 pbek

I'm still in the process of investigating...

pbek avatar Dec 14 '18 15:12 pbek

See if you can find anything about problems with QSharedMemory and QSystemSemaphore on arm architectures. Maybe they only have a limited or incomplete implementation.

Signing off for now.

itay-grudev avatar Dec 14 '18 15:12 itay-grudev

Thank you, have a great rest of your day!

pbek avatar Dec 14 '18 15:12 pbek

#52

itay-grudev avatar Dec 14 '18 15:12 itay-grudev

(I'll remind you on my two pull requests later. :smile: )

pbek avatar Dec 14 '18 15:12 pbek

#52

yes, maybe that's related...

pbek avatar Dec 14 '18 15:12 pbek

I attempted to implement a check if shared memory will work in SingleApplication in commit https://github.com/pbek/QOwnNotes/commit/23869cbcb78a2b767a4032b6de94bf6b5cc8ab8f, in case you are interested. :wink:

pbek avatar Dec 14 '18 18:12 pbek

I understand the workaround, but that's not how it's supposed to work damn it.

itay-grudev avatar Dec 14 '18 18:12 itay-grudev

I suppose I can do a v4 where the program can just fallback to standard mode if it fails and have some function like your isSupported.

itay-grudev avatar Dec 14 '18 18:12 itay-grudev

I understand the workaround, but that's not how it's supposed to work damn it.

yes, it's annoying

I suppose I can do a v4 where the program can just fallback to standard mode

that would be a possibility

pbek avatar Dec 14 '18 18:12 pbek

I messaged your guy and asked about kernel version and CPU details. I think that may be relevant in reproducing the issue.

itay-grudev avatar Dec 14 '18 18:12 itay-grudev

@pbek Feedback to fix = 8 hours. You're awesome.

itay-grudev avatar Dec 14 '18 18:12 itay-grudev

...or insane? :smile:

pbek avatar Dec 14 '18 18:12 pbek