tortoisedoc | yes | 00:00 |
---|---|---|
ol | Then 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 |
tortoisedoc | step #1 and #2 are ok | 00:04 |
tortoisedoc | for 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 |
ol | If you created "/dev/shm/f1", then "ln /dev/shm/f1 /dev/shm/f2". | 00:05 |
tortoisedoc | affirmative | 00:06 |
tortoisedoc | it appeared in both locations | 00:06 |
ol | Show me your "test.c" file. | 00:06 |
tortoisedoc | its the same as you have, except errno = 0 is added before the line of sem_open | 00:07 |
tortoisedoc | (from the pastebin) | 00:07 |
ol | Did you recompile it? | 00:07 |
tortoisedoc | yes | 00:07 |
ol | And still "HELLO 2"? | 00:07 |
ol | In the same terminal? | 00:07 |
tortoisedoc | affirmative | 00:07 |
tortoisedoc | wait ill get you a log | 00:08 |
tortoisedoc | (sb2 log with -L noise) | 00:08 |
ol | Then 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 |
tortoisedoc | done done & done | 00:09 |
tortoisedoc | same result | 00:09 |
tortoisedoc | what I don't understand is this | 00:10 |
tortoisedoc | (from strace ./a.out) | 00:10 |
tortoisedoc | readlink("/tmp/sb2-tone-20181216-000415.J17738/tmp/sem.2h8WdB", 0xffa430ab, 4096) = -1 ENOENT (No such file or directory) | 00:10 |
tortoisedoc | the readlink part | 00:10 |
ol | Or 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 |
tortoisedoc | if I have /tmp/a.txt | 00:10 |
tortoisedoc | readlink /tmp/a.txt will return 1 via $? | 00:11 |
ol | Of course, it should not be a symlink. It's a security measure. | 00:12 |
tortoisedoc | okay good point, but perhaps this is the reason it fails? should it use something else instead / readlink -f iirc | 00:13 |
ol | No, it's not. | 00:13 |
tortoisedoc | okay so the readlink is a consequence of perhaps somes stat failing | 00:13 |
tortoisedoc | btw the sb2 with the shell in the same tearget from the same terminal yields the same result | 00:14 |
ol | Just a moment, Your program has a bug. | 00:15 |
tortoisedoc | ho | 00:15 |
ol | You should check whether sem_open() returned SEM_FAILED, and check for errno value only in this case. | 00:15 |
tortoisedoc | aha | 00:15 |
tortoisedoc | okay | 00:15 |
ol | Otherwise print something else, like "SUCCESS\n". | 00:17 |
tortoisedoc | same result ;_; | 00:17 |
tortoisedoc | you know that errare umanum est, perserverare diabolicum right? ;) | 00:18 |
ol | I'm not good in Latin. | 00:18 |
tortoisedoc | it means failing is human, but persevering (in failing) is diabolic | 00:18 |
tortoisedoc | in english it translates into (i guess) "if you do the same thing expect the same result" | 00:19 |
tortoisedoc | the readlink is fishy imo | 00:19 |
tortoisedoc | but I believe you are right | 00:20 |
tortoisedoc | for an example | 00:21 |
tortoisedoc | statfs("/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}) = 0 | 00:21 |
tortoisedoc | and then | 00:21 |
tortoisedoc | lstat64("/dev/shm/sem.OYk4TR", 0xff9d5bf0) = -1 ENOENT (No such file or directory) | 00:21 |
ol | Of course, there is no such file. It's not created yet. | 00:22 |
tortoisedoc | ok great | 00:22 |
tortoisedoc | open("/dev/shm/sem.OYk4TR", O_RDWR|O_CREAT|O_EXCL, 0600) = 3 | 00:22 |
tortoisedoc | then we open the ruletree.bin | 00:23 |
tortoisedoc | then | 00:23 |
tortoisedoc | readlink("/tmp/sb2-tone-20181216-000415.J17738/tmp/sem.OYk4TR", 0xff9d3a9b, 4096) = -1 ENOENT (No such file or directory) | 00:23 |
tortoisedoc | but we just created the sem.OYk4TR no? | 00:23 |
ol | Where? | 00:23 |
tortoisedoc | hmm good question | 00:24 |
tortoisedoc | in the chroot /tmp there should be /tmp/sb2-tone-2018... right? | 00:24 |
ol | What did open64 return? | 00:24 |
tortoisedoc | checking.. | 00:24 |
ol | No. | 00:24 |
ol | It's already deleted. | 00:24 |
tortoisedoc | open returns 4 | 00:25 |
ol | This is good. | 00:25 |
tortoisedoc | ah sorry | 00:25 |
tortoisedoc | wait | 00:25 |
tortoisedoc | wrong file, my bad | 00:25 |
tortoisedoc | open on the sem returns 3 | 00:25 |
ol | And readlink is before or after that? | 00:25 |
ol | And is it on first or second file? | 00:26 |
tortoisedoc | ha | 00:26 |
tortoisedoc | could it be a race condition | 00:26 |
tortoisedoc | wait a sec | 00:26 |
tortoisedoc | let me paste this crap on pastebin | 00:26 |
tortoisedoc | https://pastebin.com/TDmNtrQp | 00:27 |
tortoisedoc | could it be | 00:27 |
tortoisedoc | it has created the semaphore in /dev/shm | 00:27 |
tortoisedoc | *but* it has not yet appeared in the $SESSION/tmp | 00:27 |
tortoisedoc | so when it goes to check for it, it doesnt find it | 00:27 |
tortoisedoc | in fact, there's no file creation routines referring to the $SESSION/tmp folder between the semaphore creation and the readlinks | 00:29 |
ol | Sequence 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 |
ol | But for every pathname a readlink() is performed by sb2. | 00:31 |
ol | WTF? Why did it open "RuleTree.bin" *before* "/dev/shm/sem.OYk4TR"? :-O | 00:33 |
tortoisedoc | shouldnt it? | 00:34 |
ol | Your environment is somehow chrewed up badly. May be sb2 is corrupted or is buggy. Or something else. | 00:34 |
tortoisedoc | hmhm | 00:35 |
ol | It should open files after mapping. | 00:35 |
tortoisedoc | I guess its time to reinstall the sdk then | 00:35 |
tortoisedoc | is the location of the ruletree.bin correct? | 00:35 |
tortoisedoc | from the $SESSION/tmp? | 00:35 |
ol | No, from session dir itself. It's correct. This is binary file created from Lua rules and placed into session dir. | 00:36 |
tortoisedoc | ok thanks good to know | 00:36 |
tortoisedoc | i think ill call it a day now | 00:37 |
tortoisedoc | too late to be looking at this | 00:37 |
ol | This is correct, but it should be open before mapping file names. | 00:37 |
tortoisedoc | thank you for your help, its been very valuable :) | 00:37 |
tortoisedoc | and sorry for being source of distraction! ) | 00:37 |
ol | Use official Sailfish SDK, it has no such problem. Otherwise, you're on your own. | 00:37 |
tortoisedoc | I wish I could | 00:38 |
tortoisedoc | but ill give it a try | 00:38 |
tortoisedoc | lets see maybe I can get the llvm tests to run there at least | 00:39 |
*** BitEvil is now known as SpeedEvil | 04:08 | |
*** Leif is now known as Guest75960 | 08:12 | |
attah | Have i been dreaming, or was there a sanity checking script for harbour compliance somewhere? | 11:48 |
r0kk3rz | there is | 11:49 |
r0kk3rz | you can run it in the sdk if you're using that | 11:49 |
attah | that's what i thought... but i'm not finding it because i'm derp | 11:53 |
attah | oh, it's "rpm file validator" under the side menu thingy | 11:54 |
r0kk3rz | yeah that thing | 12:00 |
attah | Now on to finding where it places my rpm when i press Build | 12:00 |
kimmoli | isnt it run when you deploy rpm with sdk? | 12:01 |
kimmoli | build does not do rpm. deploy does... | 12:01 |
attah | hmmm | 12:01 |
attah | The play arrow thingy becomes inactivated when i switch from Deploy as RPM Package to Deploy by Building an RPM Package | 12:03 |
attah | blargh, the build->deploy menu still works, and does what i expect | 12:05 |
attah | but it builds for i486 -.-' | 12:07 |
attah | How do i change "kit", if that's even what i need to do? | 12:13 |
attah | Apparently under "Projects" on the left, because having it in setting would have been way too easy | 12:15 |
rysiek|pl | hey all | 13:13 |
rysiek|pl | I 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|pl | I'm on Jolla Phone | 13:14 |
rysiek|pl | the phone boots, connects to the WiFi, I have SSH and devel-su access on it | 13:14 |
rysiek|pl | lipstick 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|pl | and PackageKit does not start due to libboost_system-mt.so.1.66.0 being zero size file | 13:15 |
rysiek|pl | there surely is a way to reinstall packages without PackageKit? | 13:16 |
rysiek|pl | once I get PackageKit up and running again, I should be able to just reinstall all packages, like so: | 13:16 |
rysiek|pl | https://together.jolla.com/question/160267/how-to-reinstall-all-packages/ | 13:16 |
rysiek|pl | and then I assume all should be well-ish | 13:16 |
rysiek|pl | so question is: 1. where do I get the boost-system package and 2. how do I manually install it? | 13:17 |
rysiek|pl | I assume 2. is "use rpm -i, luke" | 13:18 |
rysiek|pl | so that leaves 1. | 13:18 |
pketo | rysiek|pl: https://releases.jolla.com/releases/3.0.0.8/jolla/armv7hl/core/armv7hl/boost-system-1.66.0-1.3.2.jolla.armv7hl.rpm | 13:22 |
rysiek|pl | perfect | 13:23 |
rysiek|pl | yup, that did it, reinstalling libofonoext with pkcon is underway | 13:26 |
rysiek|pl | pketo: any reason *NOT TO* reinstall all packages with the command from the link above? | 13:26 |
rysiek|pl | command being: for p in $(rpm -q -a --qf "%{NAME}\n" | sort); do echo $p; pkcon install $p; done | 13:26 |
pketo | maybe first try running: version --dup | 13:28 |
rysiek|pl | ok | 13:28 |
rysiek|pl | `pkcon install libqofonoext` ended up in: | 13:29 |
rysiek|pl | 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 provided | 13:29 |
rysiek|pl | but that was before I ran `version --dup` | 13:29 |
rysiek|pl | waiting for that to finish now, fingers crossed | 13:29 |
pketo | did you make sure that the repositories are configured to 3.0.0.8? | 13:30 |
pketo | that is: ssu re 3.0.0.8 | 13:30 |
rysiek|pl | `Device release is currently: 3.0.0.8` | 13:30 |
pketo | ok, then it probably should be ok | 13:31 |
rysiek|pl | one can only hope | 13:31 |
*** Leif is now known as Guest85505 | 13:39 | |
rysiek|pl | hmm | 13:42 |
rysiek|pl | lipstick still does not start because /usr/lib/libqofonoext.so.1.0.23 does not exist | 13:42 |
rysiek|pl | we're after `version --dup` and after a reboot | 13:42 |
rysiek|pl | and 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 provided | 13:43 |
rysiek|pl | doing `version --dup` one more time | 13:44 |
pketo | what version do you have installed? rpm -q libqofonoext | 13:50 |
rysiek|pl | # rpm -q libqofonoext | 13:55 |
rysiek|pl | libqofonoext-1.0.23-1.5.1.jolla.armv7hl | 13:55 |
rysiek|pl | and version --dup ended up in `NO UPDATES FOUND. Try again later.` | 13:55 |
rysiek|pl | I'll just manually download that rpm | 13:56 |
rysiek|pl | and install it with rpm -i | 13:56 |
rysiek|pl | bizarre | 13:58 |
rysiek|pl | https://releases.jolla.com/releases/3.0.0.8/jolla/armv7hl/core/armv7hl/libqofonoext-1.0.23-1.5.1.jolla.armv7hl.rpm -> 404 | 13:58 |
rysiek|pl | in journal: /usr/bin/lipstick: error while loading shared libraries: /usr/lib/libqofonoext.so.1: file too short | 14:00 |
rysiek|pl | on disk | 14:00 |
rysiek|pl | lrwxrwxrwx 1 root root 22 Oct 16 09:40 /usr/lib/libqofonoext.so.1 -> libqofonoext.so.1.0.23 | 14:00 |
rysiek|pl | -rwxr-xr-x 1 root root 0 Oct 16 09:40 /usr/lib/libqofonoext.so.1.0.23 | 14:00 |
rysiek|pl | and `pkcon install libqofonoext` says: | 14:01 |
rysiek|pl | 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 provided | 14:01 |
rysiek|pl | pketo: 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|pl | Fatal error: apkd-0.8.6-1.6.8.jolla.armv7hl requires liblipstick-qt5.so.0, but this requirement cannot be provided | 14:05 |
pketo | that 1.0.23-1.5.1 should be correct | 14:10 |
rysiek|pl | so why the 404? | 14:11 |
pketo | ah, 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.rpm | 14:11 |
rysiek|pl | ah | 14:12 |
rysiek|pl | ok, I did `ssu re 3.0.0.8` again | 14:12 |
rysiek|pl | and doing `version --dup`, just in case there was something borked with repo config or some such | 14:13 |
rysiek|pl | after that I'll install this manually | 14:13 |
rysiek|pl | humm `version --dup` times out and retries | 15:17 |
rysiek|pl | Error: Installation aborted by user | 15:22 |
rysiek|pl | Finished transaction (status=2, runtime=417656ms | 15:22 |
rysiek|pl | weird | 15:22 |
attah | How do i detect that an app is minimized? PageStatus.Inactive apparently isn't it.. | 18:12 |
tortoisedoc | hello hello | 18:38 |
tortoisedoc | ol : fyi, I found a way to "make it work" / a cludge | 18:39 |
tortoisedoc | in the rules | 18:39 |
tortoisedoc | ol in the dev.lua, replace the -- replace_by = session_dir .. "/tmp"}, | 18:39 |
tortoisedoc | with | 18:39 |
tortoisedoc | replace_by "/dev/shm"}, | 18:39 |
tortoisedoc | (basically passing through | 18:39 |
tortoisedoc | ol : indeed it must have something to do with the chroot | 18:43 |
tortoisedoc | as in if i do touch /dev/shm/test.txt | 18:44 |
tortoisedoc | (in the sb2 target) | 18:44 |
tortoisedoc | the file will appear not in /tmp of the target, not in $SESSION/tmp of the chroot either, but in /tmp of the chroot | 18:44 |
tortoisedoc | so 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|pl | hmmm | 19:26 |
rysiek|pl | trying to reinstall all packages after a bitched upgrade that left me with an non-working lipstick on Jolla Phone | 19:26 |
rysiek|pl | here's what I get: | 19:26 |
rysiek|pl | https://pad.hskrk.pl/p/r.dcd3856c29751cadb90ecc49175f0abc | 19:26 |
rysiek|pl | I did `ssu re 3.0.0.8` and `version --dup` multiple times | 19:29 |
rysiek|pl | to me it looks like some indexes are not updated or some such and it is trying to download old versions of files | 19:29 |
rysiek|pl | *of packages | 19:29 |
rysiek|pl | is there anywhere where I can check which versions should be installed on SailfishOS 3.0.0.8 on a Jolla Phone? | 19:29 |
r0kk3rz | what version do you have on it now? | 19:34 |
rysiek|pl | ssu re shows 3.0.0.8 | 19:35 |
r0kk3rz | ok, what did you have on it before? | 19:36 |
rysiek|pl | not entirely sure, but it was the latest available for Jolla Phone at the time | 19:36 |
rysiek|pl | I always install updates in a timely manner | 19:36 |
rysiek|pl | but it was 2.x | 19:37 |
rysiek|pl | I vaguely remember it might have been 2.4.x, but I might be wrong | 19:37 |
r0kk3rz | so long as you didnt miss an update | 19:40 |
rysiek|pl | r0kk3rz: true, but whenever I see an update available, I install it | 19:41 |
rysiek|pl | the weird thing is that there are so many packages that pkcon complains as not available in the medium | 19:41 |
rysiek|pl | like: 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|pl | which makes me think there is something wrong with rpm's package index or some such | 19:42 |
r0kk3rz | do a pkcon refresh just to be sure | 19:42 |
rysiek|pl | ok, running | 19:42 |
rysiek|pl | Refreshing software list [ ] (0%) | 19:43 |
rysiek|pl | takes ages | 19:43 |
r0kk3rz | what repos do you have enabled? | 19:43 |
rysiek|pl | how do I check? it should only be stock | 19:44 |
r0kk3rz | ssu lr | 19:44 |
rysiek|pl | r0kk3rz: added at the top of the pad here https://pad.hskrk.pl/p/r.dcd3856c29751cadb90ecc49175f0abc | 19:44 |
r0kk3rz | yeah looks normal | 19:45 |
rysiek|pl | curling store-repository* ones gives me 401 Authorization Required | 19:48 |
rysiek|pl | I am guessing that's expected | 19:48 |
rysiek|pl | others give a 302 redirect | 19:48 |
rysiek|pl | Refreshing software list [================================================== ] (66%) | 19:48 |
rysiek|pl | any way to get it more verbose and check where it gets stuck? | 19:49 |
rysiek|pl | I mean 5mins to get repo indexes?.. | 19:49 |
rysiek|pl | > Finished | 19:50 |
rysiek|pl | holy cown, it seems to have helped, no more missing-in-medium errors | 19:50 |
r0kk3rz | it really shouldnt have taken that long, but hopefully that helps | 20:00 |
rysiek|pl | ok, I am running `for p in $(rpm -q -a --qf "%{NAME}\n" | sort); do echo $p; pkcon install --only-download $p; done` now | 20:01 |
rysiek|pl | basically downloading all packages | 20:01 |
r0kk3rz | why? | 20:01 |
rysiek|pl | because 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|pl | and I want to reinstall all packages just in case there are more packages affected | 20:02 |
rysiek|pl | but perhaps I should run `version --dup` instead? | 20:02 |
r0kk3rz | sounds bad | 20:02 |
r0kk3rz | but yes, do the dup dance instead | 20:03 |
rysiek|pl | ok, will do again, then | 20:03 |
rysiek|pl | (did before mulitple times but that was before `pkcon refresh`, so perhaps now it's going to work better) | 20:03 |
tortoisedoc | ol: also I don't understand, whats unsafe in reading from /dev/shm? | 20:15 |
tortoisedoc | (semaphores, that is) | 20:15 |
ol | I don't remember. It was quite a long time ago. | 20:16 |
tortoisedoc | ok thanks | 20:17 |
tortoisedoc | btw the readlink of sb2 are done to verify existance only apparently | 20:17 |
ol | No, sb2 does readlink because it performs mapping of symlink's contentю | 20:19 |
ol | No, sb2 does readlink because it performs mapping of symlink's content. | 20:19 |
tortoisedoc | ah ok | 20:20 |
rysiek|pl | r0kk3rz: "NO UPDATES FOUND. Try again later." | 22:15 |
rysiek|pl | so, going to reinstall all packages I guess :/ | 22:15 |
rysiek|pl | unless you have a better idea how to ensure all are properly installed | 22:15 |
r0kk3rz[m] | What makes you think they aren't? | 22:16 |
rysiek|pl | Dec 16 23:07:58 Sailfish lipstick[17053]: [C] unknown:0 - Failed to create display (No such file or directory) | 22:17 |
rysiek|pl | Dec 16 23:07:58 Sailfish systemd[1233]: lipstick.service: Main process exited, code=exited, status=1/FAILURE | 22:17 |
rysiek|pl | Dec 16 23:07:58 Sailfish systemd[1233]: Failed to start The lipstick UI. | 22:17 |
rysiek|pl | this "no such file or directory" issue cropped up before with PackageKit, and with the other library | 22:18 |
rysiek|pl | so I assume there are more problems like these | 22:18 |
rysiek|pl | ● lipstick.service | 22: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 here | 22:19 |
rysiek|pl | r0kk3rz[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/!