Sunday, 2018-12-16

tortoisedocyes00:00
olThen repat this. Run shell in sb2. Then in this shell:00:03
ol* check whether you have "/tmp" and "/dev/shm";00:03
ol* create a file in "/dev/shm", check whether this file appeared in both "/dev/shm" and "/tmp";00:03
ol* link this file to another name in "/dev/shm" (hard link, not symlink), check whether this new name appeared in "/dev/shm" and "/tmp".00:03
tortoisedocstep #1 and #2 are ok00:04
tortoisedocfor the third one, is "this file" referring to the one in /tmp or the one in /dev/shm?00:05
tortoisedoc(i guess the former)00:05
olIf you created "/dev/shm/f1", then "ln /dev/shm/f1 /dev/shm/f2".00:05
tortoisedocaffirmative00:06
tortoisedocit appeared in both locations00:06
olShow me your "test.c" file.00:06
tortoisedocits the same as you have, except errno = 0 is added before the line of sem_open00:07
tortoisedoc(from the pastebin)00:07
olDid you recompile it?00:07
tortoisedocyes00:07
olAnd still "HELLO 2"?00:07
olIn the same terminal?00:07
tortoisedocaffirmative00:07
tortoisedocwait ill get you a log00:08
tortoisedoc(sb2 log with -L noise)00:08
olThen you did something else wrong. In the same terminal:00:09
ol* double-check that your "test.c" is the one you're expecting;00:09
ol* recompile it in sb2 for the same target;00:09
ol* run it inside sb2.00:09
tortoisedocdone done & done00:09
tortoisedocsame result00:09
tortoisedocwhat I don't understand is this00:10
tortoisedoc(from strace ./a.out)00:10
tortoisedocreadlink("/tmp/sb2-tone-20181216-000415.J17738/tmp/sem.2h8WdB", 0xffa430ab, 4096) = -1 ENOENT (No such file or directory)00:10
tortoisedocthe readlink part00:10
olOr even better: run the shell inside sb2 for the same target in the same terminal. Check the file, recompile, run. Also create a file in "/dev/shm", check, link, ckeck, as before.00:10
tortoisedocif I have /tmp/a.txt00:10
tortoisedocreadlink /tmp/a.txt will return 1 via $?00:11
olOf course, it should not be a symlink. It's a security measure.00:12
tortoisedocokay good point, but perhaps this is the reason it fails? should it use something else instead / readlink -f iirc00:13
olNo, it's not.00:13
tortoisedocokay so the readlink is a consequence of perhaps somes stat failing00:13
tortoisedocbtw the sb2 with the shell in the same tearget from the same terminal yields the same result00:14
olJust a moment, Your program has a bug.00:15
tortoisedocho00:15
olYou should check whether sem_open() returned SEM_FAILED, and check for errno value only in this case.00:15
tortoisedocaha00:15
tortoisedocokay00:15
olOtherwise print something else, like "SUCCESS\n".00:17
tortoisedocsame result ;_;00:17
tortoisedocyou know that errare umanum est, perserverare diabolicum right? ;)00:18
olI'm not good in Latin.00:18
tortoisedocit means failing is human, but persevering (in failing) is diabolic00:18
tortoisedocin english it translates into (i guess) "if you do the same thing expect the same result"00:19
tortoisedocthe readlink is fishy imo00:19
tortoisedocbut I believe you are right00:20
tortoisedocfor an example00:21
tortoisedocstatfs("/dev/shm", {f_type=TMPFS_MAGIC, f_bsize=4096, f_blocks=1004562, f_bfree=962566, f_bavail=962566, f_files=1004562, f_ffree=1004389, f_fsid={val=[0, 0]}, f_namelen=255, f_frsize=4096, f_flags=ST_VALID|ST_NOSUID|ST_NODEV}) = 000:21
tortoisedocand then00:21
tortoisedoclstat64("/dev/shm/sem.OYk4TR", 0xff9d5bf0) = -1 ENOENT (No such file or directory)00:21
olOf course, there is no such file. It's not created yet.00:22
tortoisedocok great00:22
tortoisedocopen("/dev/shm/sem.OYk4TR", O_RDWR|O_CREAT|O_EXCL, 0600) = 300:22
tortoisedocthen we open the ruletree.bin00:23
tortoisedocthen00:23
tortoisedocreadlink("/tmp/sb2-tone-20181216-000415.J17738/tmp/sem.OYk4TR", 0xff9d3a9b, 4096) = -1 ENOENT (No such file or directory)00:23
tortoisedocbut we just created the  sem.OYk4TR no?00:23
olWhere?00:23
tortoisedochmm good question00:24
tortoisedocin the chroot /tmp there should be /tmp/sb2-tone-2018... right?00:24
olWhat did open64 return?00:24
tortoisedocchecking..00:24
olNo.00:24
olIt's already deleted.00:24
tortoisedocopen returns 400:25
olThis is good.00:25
tortoisedocah sorry00:25
tortoisedocwait00:25
tortoisedocwrong file, my bad00:25
tortoisedocopen on the sem returns 300:25
olAnd readlink is before or after that?00:25
olAnd is it on first or second file?00:26
tortoisedocha00:26
tortoisedoccould it be a race condition00:26
tortoisedocwait a sec00:26
tortoisedoclet me paste this crap on pastebin00:26
tortoisedochttps://pastebin.com/TDmNtrQp00:27
tortoisedoccould it be00:27
tortoisedocit has created the semaphore in /dev/shm00:27
tortoisedoc*but* it has not yet appeared in the $SESSION/tmp00:27
tortoisedocso when it goes to check for it, it doesnt find it00:27
tortoisedocin fact, there's no file creation routines referring to the $SESSION/tmp folder between the semaphore creation and the readlinks00:29
olSequence is the following:00:31
ol* open64('/dev/shm/sem.Xq50Qf') returns returns 3, errno=2 (unchanged);00:31
ol* link(' /dev/shm/sem.Xq50Qf', '/dev/shm/sem.aaa') returns 0, errno=2 (unchanged).00:31
olBut for every pathname a readlink() is performed by sb2.00:31
olWTF? Why did it open "RuleTree.bin" *before* "/dev/shm/sem.OYk4TR"? :-O00:33
tortoisedocshouldnt it?00:34
olYour environment is somehow chrewed up badly. May be sb2 is corrupted or is buggy. Or something else.00:34
tortoisedochmhm00:35
olIt should open files after mapping.00:35
tortoisedocI guess its time to reinstall the sdk then00:35
tortoisedocis the location of the ruletree.bin correct?00:35
tortoisedocfrom the $SESSION/tmp?00:35
olNo, from session dir itself. It's correct. This is binary file created from Lua rules and placed into session dir.00:36
tortoisedocok thanks good to know00:36
tortoisedoci think ill call it a day now00:37
tortoisedoctoo late to be looking at this00:37
olThis is correct, but it should be open before mapping file names.00:37
tortoisedocthank you for your help, its been very valuable :)00:37
tortoisedocand sorry for being source of distraction! )00:37
olUse official Sailfish SDK, it has no such problem. Otherwise, you're on your own.00:37
tortoisedocI wish I could00:38
tortoisedocbut ill give it a try00:38
tortoisedoclets see maybe I can get the llvm tests to run there at least00:39
*** BitEvil is now known as SpeedEvil04:08
*** Leif is now known as Guest7596008:12
attahHave i been dreaming, or was there a sanity checking script for harbour compliance somewhere?11:48
r0kk3rzthere is11:49
r0kk3rzyou can run it in the sdk if you're using that11:49
attahthat's what i thought... but i'm not finding it because i'm derp11:53
attahoh,  it's "rpm file validator" under the side menu thingy11:54
r0kk3rzyeah that thing12:00
attahNow on to finding where it places my rpm when i press Build12:00
kimmoliisnt it run when you deploy rpm with sdk?12:01
kimmolibuild does not do rpm. deploy does...12:01
attahhmmm12:01
attahThe play arrow thingy becomes inactivated when i switch from Deploy as RPM Package to Deploy by Building an RPM Package12:03
attahblargh, the build->deploy menu still works, and does what i expect12:05
attahbut it builds for i486 -.-'12:07
attahHow do i change "kit", if that's even what i need to do?12:13
attahApparently under "Projects" on the left, because having it in setting would have been way too easy12:15
rysiek|plhey all13:13
rysiek|plI am trying to fix a 2.x -> 3.0.0.8 SailfishOS upgrade that went wrong (probably because of loss of power during upgrade)13:14
rysiek|plI'm on Jolla Phone13:14
rysiek|plthe phone boots, connects to the WiFi, I have SSH and devel-su access on it13:14
rysiek|pllipstick does not start due to libqofonoext package not having been installed properly (specifically, libqofonoext.so.1.0.23 file does not exist)13:15
rysiek|pland PackageKit does not start due to libboost_system-mt.so.1.66.0 being zero size file13:15
rysiek|plthere surely is a way to reinstall packages without PackageKit?13:16
rysiek|plonce I get PackageKit up and running again, I should be able to just reinstall all packages, like so:13:16
rysiek|plhttps://together.jolla.com/question/160267/how-to-reinstall-all-packages/13:16
rysiek|pland then I assume all should be well-ish13:16
rysiek|plso question is: 1. where do I get the boost-system package and 2. how do I manually install it?13:17
rysiek|plI assume 2. is "use rpm -i, luke"13:18
rysiek|plso that leaves 1.13:18
pketorysiek|pl: https://releases.jolla.com/releases/3.0.0.8/jolla/armv7hl/core/armv7hl/boost-system-1.66.0-1.3.2.jolla.armv7hl.rpm13:22
rysiek|plperfect13:23
rysiek|plyup, that did it, reinstalling libofonoext with pkcon is underway13:26
rysiek|plpketo: any reason *NOT TO* reinstall all packages with the command from the link above?13:26
rysiek|plcommand being: for p in $(rpm -q -a --qf "%{NAME}\n" | sort); do echo $p; pkcon install $p; done13:26
pketomaybe first try running: version --dup13:28
rysiek|plok13:28
rysiek|pl`pkcon install libqofonoext` ended up in:13:29
rysiek|plFatal error: libqofonoext-declarative-1.0.23-1.5.1.jolla.armv7hl requires libqofonoext = 1.0.23-1.5.1.jolla, but this requirement cannot be provided13:29
rysiek|plbut that was before I ran `version --dup`13:29
rysiek|plwaiting for that to finish now, fingers crossed13:29
pketodid you make sure that the repositories are configured to 3.0.0.8?13:30
pketothat is: ssu re 3.0.0.813:30
rysiek|pl`Device release is currently: 3.0.0.8`13:30
pketook, then it probably should be ok13:31
rysiek|plone can only hope13:31
*** Leif is now known as Guest8550513:39
rysiek|plhmm13:42
rysiek|pllipstick still does not start because /usr/lib/libqofonoext.so.1.0.23 does not exist13:42
rysiek|plwe're after `version --dup` and after a reboot13:42
rysiek|pland pkcon install libqofonoext still gives me: Fatal error: libqofonoext-declarative-1.0.23-1.5.1.jolla.armv7hl requires libqofonoext = 1.0.23-1.5.1.jolla, but this requirement cannot be provided13:43
rysiek|pldoing `version --dup` one more time13:44
pketowhat version do you have installed? rpm -q libqofonoext13:50
rysiek|pl# rpm -q libqofonoext13:55
rysiek|pllibqofonoext-1.0.23-1.5.1.jolla.armv7hl13:55
rysiek|pland version --dup ended up in `NO UPDATES FOUND. Try again later.`13:55
rysiek|plI'll just manually download that rpm13:56
rysiek|pland install it with rpm -i13:56
rysiek|plbizarre13:58
rysiek|plhttps://releases.jolla.com/releases/3.0.0.8/jolla/armv7hl/core/armv7hl/libqofonoext-1.0.23-1.5.1.jolla.armv7hl.rpm -> 40413:58
rysiek|plin journal: /usr/bin/lipstick: error while loading shared libraries: /usr/lib/libqofonoext.so.1: file too short14:00
rysiek|plon disk14:00
rysiek|pllrwxrwxrwx 1 root root 22 Oct 16 09:40 /usr/lib/libqofonoext.so.1 -> libqofonoext.so.1.0.2314:00
rysiek|pl-rwxr-xr-x 1 root root 0 Oct 16 09:40 /usr/lib/libqofonoext.so.1.0.2314:00
rysiek|pland `pkcon install libqofonoext` says:14:01
rysiek|plFatal error: libqofonoext-declarative-1.0.23-1.5.1.jolla.armv7hl requires libqofonoext = 1.0.23-1.5.1.jolla, but this requirement cannot be provided14:01
rysiek|plpketo: is there a way to check somewhere which version of libqofonoext SailfishOS 3.0.0.8 expects/requires?14:03
rysiek|pl`pkcon install lipstick-qt5` gives:14:05
rysiek|plFatal error: apkd-0.8.6-1.6.8.jolla.armv7hl requires liblipstick-qt5.so.0, but this requirement cannot be provided14:05
pketothat 1.0.23-1.5.1 should be correct14:10
rysiek|plso why the 404?14:11
pketoah, it's in middleware so https://releases.jolla.com/releases/3.0.0.8/jolla/armv7hl/mw/armv7hl/libqofonoext-1.0.23-1.5.1.jolla.armv7hl.rpm14:11
rysiek|plah14:12
rysiek|plok, I did `ssu re 3.0.0.8` again14:12
rysiek|pland doing `version --dup`, just in case there was something borked with repo config or some such14:13
rysiek|plafter that I'll install this manually14:13
rysiek|plhumm `version --dup` times out and retries15:17
rysiek|plError: Installation aborted by user15:22
rysiek|plFinished transaction (status=2, runtime=417656ms15:22
rysiek|plweird15:22
attahHow do i detect that an app is minimized? PageStatus.Inactive apparently isn't it..18:12
tortoisedochello hello18:38
tortoisedocol : fyi, I found a way to "make it work" / a cludge18:39
tortoisedocin the rules18:39
tortoisedocol in the dev.lua, replace the --       replace_by = session_dir .. "/tmp"},18:39
tortoisedocwith18:39
tortoisedocreplace_by "/dev/shm"},18:39
tortoisedoc(basically passing through18:39
tortoisedocol : indeed it must have something to do with the chroot18:43
tortoisedocas in if i do touch /dev/shm/test.txt18:44
tortoisedoc(in the sb2 target)18:44
tortoisedocthe file will appear not in /tmp of the target, not in $SESSION/tmp of the chroot either, but in /tmp of the chroot18:44
tortoisedocso something is disregarding the mapping to $SESSION I guess (when running sb2 in chroot)18:45
tortoisedoc(im assuming it would be supposed to create the file in $SESSION/tmp instead of /tmp of the chroot)18:48
rysiek|plhmmm19:26
rysiek|pltrying to reinstall all packages after a bitched upgrade that left me with an non-working lipstick on Jolla Phone19:26
rysiek|plhere's what I get:19:26
rysiek|plhttps://pad.hskrk.pl/p/r.dcd3856c29751cadb90ecc49175f0abc19:26
rysiek|plI did `ssu re 3.0.0.8` and `version --dup` multiple times19:29
rysiek|plto me it looks like some indexes are not updated or some such and it is trying to download old versions of files19:29
rysiek|pl*of packages19:29
rysiek|plis there anywhere where I can check which versions should be installed on SailfishOS 3.0.0.8 on a Jolla Phone?19:29
r0kk3rzwhat version do you have on it now?19:34
rysiek|plssu re shows 3.0.0.819:35
r0kk3rzok, what did you have on it before?19:36
rysiek|plnot entirely sure, but it was the latest available for Jolla Phone at the time19:36
rysiek|plI always install updates in a timely manner19:36
rysiek|plbut it was 2.x19:37
rysiek|plI vaguely remember it might have been 2.4.x, but I might be wrong19:37
r0kk3rzso long as you didnt miss an update19:40
rysiek|plr0kk3rz: true, but whenever I see an update available, I install it19:41
rysiek|plthe weird thing is that there are so many packages that pkcon complains as not available in the medium19:41
rysiek|pllike: Fatal error: File './core/armv7hl/bzip2-1.0.6-1.1.5.armv7hl.rpm' not found on medium 'https://releases.jolla.com/releases/3.0.0.8/jolla/armv7hl/'19:42
rysiek|plwhich makes me think there is something wrong with rpm's package index or some such19:42
r0kk3rzdo a pkcon refresh just to be sure19:42
rysiek|plok, running19:42
rysiek|plRefreshing software list  [                ] (0%)19:43
rysiek|pltakes ages19:43
r0kk3rzwhat repos do you have enabled?19:43
rysiek|plhow do I check? it should only be stock19:44
r0kk3rzssu lr19:44
rysiek|plr0kk3rz: added at the top of the pad here https://pad.hskrk.pl/p/r.dcd3856c29751cadb90ecc49175f0abc19:44
r0kk3rzyeah looks normal19:45
rysiek|plcurling store-repository* ones gives me 401 Authorization Required19:48
rysiek|plI am guessing that's expected19:48
rysiek|plothers give a 302 redirect19:48
rysiek|plRefreshing software list  [==================================================                           ] (66%)19:48
rysiek|plany way to get it more verbose and check where it gets stuck?19:49
rysiek|plI mean 5mins to get repo indexes?..19:49
rysiek|pl> Finished19:50
rysiek|plholy cown, it seems to have helped, no more missing-in-medium errors19:50
r0kk3rzit really shouldnt have taken that long, but hopefully that helps20:00
rysiek|plok, I am running `for p in $(rpm -q -a --qf "%{NAME}\n" | sort); do echo $p; pkcon install --only-download $p; done` now20:01
rysiek|plbasically downloading all packages20:01
r0kk3rzwhy?20:01
rysiek|plbecause there are some packages that are not installed properly (I had that problem with boost-system, and libqofonoext, had to download manually and install with rpm)20:02
rysiek|pland I want to reinstall all packages just in case there are more packages affected20:02
rysiek|plbut perhaps I should run `version --dup` instead?20:02
r0kk3rzsounds bad20:02
r0kk3rzbut yes, do the dup dance instead20:03
rysiek|plok, will do again, then20:03
rysiek|pl(did before mulitple times but that was before `pkcon refresh`, so perhaps now it's going to work better)20:03
tortoisedocol:  also I don't understand, whats unsafe in reading from /dev/shm?20:15
tortoisedoc(semaphores, that is)20:15
olI don't remember. It was quite a long time ago.20:16
tortoisedocok thanks20:17
tortoisedocbtw the readlink of sb2 are done to verify existance only apparently20:17
olNo, sb2 does readlink because it performs mapping of symlink's contentю20:19
olNo, sb2 does readlink because it performs mapping of symlink's content.20:19
tortoisedocah ok20:20
rysiek|plr0kk3rz: "NO UPDATES FOUND. Try again later."22:15
rysiek|plso, going to reinstall all packages I guess :/22:15
rysiek|plunless you have a better idea how to ensure all are properly installed22:15
r0kk3rz[m]What makes you think they aren't?22:16
rysiek|plDec 16 23:07:58 Sailfish lipstick[17053]: [C] unknown:0 - Failed to create display (No such file or directory)22:17
rysiek|plDec 16 23:07:58 Sailfish systemd[1233]: lipstick.service: Main process exited, code=exited, status=1/FAILURE22:17
rysiek|plDec 16 23:07:58 Sailfish systemd[1233]: Failed to start The lipstick UI.22:17
rysiek|plthis "no such file or directory" issue cropped up before with PackageKit, and with the other library22:18
rysiek|plso I assume there are more problems like these22:18
rysiek|pl● lipstick.service22:19
rysiek|pl   Loaded: not-found (Reason: No such file or directory)22:19
rysiek|pl(although the lipstick.service file actually exists, so no idea what systemd complains about here22:19
rysiek|plr0kk3rz[m]: or to put it differently: are there reasons *not* to reinstall all packages? i.e. can that make the situation worse in any way?22:22

Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!