<nekobot>
[haiku/haiku] 1110e6fc658b - freebsd_network: Migrate callout invocation to another function.
<nekobot>
[haiku/haiku] f863f473b5f5 - freebsd_network: Check for c_due > 0 in the callout invocation.
* zdykstra
cheers
<waddlesplash>
:)
<waddlesplash>
that was a ridiculous two-day adventure
<waddlesplash>
but at least, I get the satisfaction of having 3 components to refactor and inject more assertions into over the next few days
<zdykstra>
the writeup is eye-opening
<waddlesplash>
to make the next time this has to be debugged a much less arduous problem
<waddlesplash>
zdykstra: heh, if you ever want a fun time, go read the comments on the ConditionVariables implementation that I wrote last year :)
<waddlesplash>
that was actually the second time I refactored that code, the first time a few years earlier, I wasn't really ready for and the logic got the better of me, and wasn't quite right
<waddlesplash>
the rewrite last year seems to have gone over much better, resolved some issues the earlier rewrite had created
<waddlesplash>
and, I haven't gone digging especially far, but it's possible that "algorithm" is actually quite novel
<zdykstra>
what is ConditionVariables? That's not something I've come across before
<waddlesplash>
a synchronization primitive, like semaphores and mutexes, but with different semantics
<waddlesplash>
a cvar basically has an "object", which you "wait" on, and then when an event occurs, the object "wakes up" one, more, all waiters
<waddlesplash>
on most other systems they're basically countless semaphores
<waddlesplash>
but on Haiku, we have this odd (and maybe crazy) feature: you don't just call into a condition variable (e.g. "condvar_wait(...)") you can actually create a "Wait Entry" object, which you "add" to the variable; and then go off and do other work, and then later come around and check "was this signalled yet"?
<waddlesplash>
there are some critical kernel sections where that feature is VERY valuable
<waddlesplash>
but it means that, on the implementation side, you have a ton more edge-cases to handle because it is possible that condition-variables or wait-entries can each survive the death of the other and you have no control over that fact
<waddlesplash>
it is also possible, due to timeouts, that the condvar and the wait-entry wake up simultaneously or near enough to it to race
<waddlesplash>
so, having this all work properly, without triggering use-after-frees, dangling references, or (most likely of all) races into deadlocks, is quite the dance
<zdykstra>
that sounds intensely frustrating to debug
<waddlesplash>
you basically cannot debug it
<waddlesplash>
adding printfs changes timing sufficiently so as to make testing useless
<waddlesplash>
a printf takes a few dozen microseconds at most (well, maybe hundreds), that's enough to throw off data races
<waddlesplash>
your only option is adding very careful assertions in corner cases to catch when things have gone off the rails so far as to invalidate your assumptions
<waddlesplash>
otherwise, you have to just be clever enough to figure out what went wrong; and also to be detail-oriented enough when writing the code to be reasonably sure you handled every possible case of the interlocking stage
<x512[m]>
Context menus in Netbeans IDE are not displayed if goes outside of parent window bounds.
<x512[m]>
It attempts to create semi-transparent window to display shadow, get exception so it is not supported and as result do not show window at all.
<waddlesplash>
zdykstra: the original code used a spinlock on each end to synchronize; one for the cvar and one for the entry. the new code I wrote last year has only one spinlock, on the cvar, and then has 3 different atomically-updated variables for all the other points
<waddlesplash>
it's more complicated in the design and implementation but I am pretty sure much less in terms of execution
<zdykstra>
it's nice to be able to use the fruits of that labor, that's for sure :)
<zdykstra>
I need to resume work on mail_daemon and try to find the condition(s) that cause it to stop downloading messages.
<zdykstra>
I'm pretty hesitant to try adding new features to things, as I don't really have a feel yet for what will be accepted or not. But bug fixing little stuff tends to be well received.
<waddlesplash>
one of these days I should really try to figure out if this is "novel" and worth publishing as a paper of some kind
<waddlesplash>
it was a few days' work for me, but sometimes I've gone looking for this kind of thing before and found not much prior art...
<zdykstra>
that'd be nice to get your name out there if it is novel
<waddlesplash>
yeah, well, I'm not formally educated in CS, so I don't even know where to start looking tbh
<waddlesplash>
I should probably go ask some of the FreeBSD people I know...
<waddlesplash>
zdykstra: it's great to see mail_daemon getting some work done, it's needed it for sure :)
<x512[m]>
I am a bit skeptical about non-standard condition variable implementation.
Begasus_32 has quit [Quit: Vision[]: Gone to the dogs!]
Begasus_32 has joined #haiku
dqk_ has quit [Ping timeout: 480 seconds]
xet7 has quit [Ping timeout: 480 seconds]
OscarL has joined #haiku
<Begasus>
Aloha OscarL
<OscarL>
Hi there Begasus :-)
<OscarL>
just waking up here... 03:0... and no coffee on the house... :-(
<Begasus>
lol
<Begasus>
same here ;) (just had one package to make one cup)
<Begasus>
no nightshop around to get some?
<OscarL>
Noup, and coffee got crazy expensive (well everything did) so... I'm hoping to catch some sale on the super-markets next time I go there to buy food :-)
<OscarL>
For now... good old Argentine's "mate" it is.
<Begasus>
Don't know 'bout you, but I get nervous if I don't have my morning coffee ;)
Blendie has joined #haiku
<OscarL>
Well.... I drank 1 liter of coffee a day since I was 12 so...
<Begasus>
heh
<zdykstra>
You're caffeinated for the next 9 years
<OscarL>
But at some point I had to cut it out... was getting ticks on my eyes, and cutting back the coffee made them go away :-). Now, I only drink it more ocassionally.
<OscarL>
zdykstra: heh, more or less, yeah :-)
<Begasus>
Think I'm still at about 1 liter ;)
<Begasus>
Specificly told our boss to have a coffee machine around when we moved to a new building at work some years ago :P
<OscarL>
Same when I worked at EPSON... "Ok guys... no window in the office I can handle, albeit I would prefer one. But... no coffee, no code. Period."
<Begas_VM>
I'm seeing things like this failing builds recently (or I never checked those): multiple definition of ...
<Begas_VM>
menu_cache builds fine with gcc2 but fails with gcc11 (no error, just the mention)?
<jessicah>
something linked in twice
<jessicah>
got a log?
<Begas_VM>
can grab one
<jessicah>
heh, I can't stand coffee, but I probably drink like 10 cups of tea a day
<OscarL>
A box of 50 tea bags last me around 5 years :-)
vdamewood has quit [Remote host closed the connection]
vdamewood has joined #haiku
<Begasus>
I think you could have closed it too OscarL ?
<OscarL>
Noup. I didn't open that one, and I'm just a lowly collaborator :-D
<Begasus>
Ah, then not ;)
<OscarL>
Regarding that menu thing Begasus .... you could just add a header guard with Pe's HeaderGuard extension, and give it another go?
<jessicah>
yeah, that's all the tags file needs
<OscarL>
no idea why it doesn't already. And it gets included on all three .c files, LOL.
<Begasus>
eh, and how should I do that OscarL ?
<OscarL>
open the "menu-cache/menu-cache-gen/menu-tags.h" inside the "work-*/sources/*" tree...
<OscarL>
or whatever it is.... you need to open "menu-tags.h", and use the HeaderGuard extension from Pe's Extension menu.
<Begasus>
and then just click on HeaderGuard in the menu?
<OscarL>
yup
<Begasus>
k, checking ...
<OscarL>
and then the usual git add/commit in the git work repo, and hp -e on the hp repo.
<Begasus>
same thing
<Begasus_32>
#ifndef _MENU_TAGS_H_
<Begasus_32>
#define _MENU_TAGS_H_
<Begasus>
those were added by Pe
<OscarL>
mmm, will check locally later then.
<Begasus>
thanks
<OscarL>
np. Need to organize a bit the group of recipes I was working on last night... lost track of which have PRs open already, and some I don't even have local branches, heh.
<Begasus>
heh
<Begasus>
Trying to write up a first draft for a haikuporter/haikuports report for the forum, still get sidetracked ;)
<Begasus_32>
waiting for build package menu_cache_x86-1.1.0-3 to be deactivated
<OscarL>
(re: sidetracks) Seems we share that problem, yeah... :-D
<Begasus>
yeah ;)
<Begasus>
stackoverflow to the resque? ;)
<Begasus_32>
export CFLAGS="-fcommon"
<Begasus>
seems to do the trick for gcc11
<OscarL>
seems "-fno-common" is the default for gcc >= 10?
<Begasus>
no clue ;)
<Begasus>
gcc2 is fine with it also
<OscarL>
(otherwise maybe the .h is missing some "extern"s)
<Begasus>
k, can't check a build for glib2 on gcc2 then ;)
<OscarL>
haven't tested on 32 bits, would that make a difference?
<Begasus>
still uses python2.7!
<OscarL>
I mean... I've just tested the package from the repo.
<Begasus>
for gcc11 it's OK I guess
<OscarL>
I've just was curious about seeing Haiku's gemini site in action. Didn't worked on my PC, filed issue, and tried to avoig getting side-tracked :-D
<Begasus>
heh
<OscarL>
btw... speaking of things using still python 2.7....
<OscarL>
do you know why we keep 37 recipe versions for rust?
<Begasus>
ask nielx when he's around ;)
<OscarL>
k
<Begasus>
had some talks about it some time ago
<Begasus>
even removing the recipes from the repo won't remove the build packages (to free space on the server)
<OscarL>
AFAI Understand... rust ain't too compatible between versions. Maybe some old recipes are needed for bootstrap reasons, but 37 of them... seems weird.
<Begasus>
heh
<OscarL>
(re: rust comp... or at least it wasn't on older versions, I think?)
<Begasus>
ps, removed python2.7 and python3.7 from the system atm
<Begasus>
no major breakage so far
<OscarL>
nice.
<OscarL>
when you have some free time... I could use your expertize in deciphering something on the pycurl recipe.
<Begasus>
and can live without glib2_devel for gcc2 atm
<trungnt2910[m]>
<OscarL> "Seems to handle the application..." <- Hmmm I'm trying to find out how many syscalls this thing will need and how hard it is to emulate all of them.
<OscarL>
trungnt2910[m]: I'm affraid that link to registrar sources is the best I can do :-). You'll probably want to ask one of the actual devs (if they don't chime in soon enough).
<trungnt2910[m]>
OscarL: I think the newsletter you linked to is good enough. Thanks!
<OscarL>
cool! :-)
<trungnt2910[m]>
Currently stuck on _kern_start_watching_system. The blog post explains what the registrar is and why that syscall is needed.
<OscarL>
Begasus: do you have any full log of for when it fails to link? Maybe there's a clue about where it is looking for libpython3.9, and failing to find it?
DKnoto has quit [Quit: Leaving]
<Begasus>
not at this time OscarL (guess Terminal is filled to the top with the other rebuilds) :)
<OscarL>
understood.
<OscarL>
mmm I always have a hard time finding the implementation of those syscalls... I get lost on the _kern_start_watching_system -> _user_start_watching_system step :-)
<x512[m]>
trungnt2910: registrar store list of running BApplication's, manage users, update file MIME types, send timer messages for BMessageRunner.
<trungnt2910[m]>
x512[m]: What does the last one mean?
<trungnt2910[m]>
_kern_start_watching_system probably means the first functionality...
<x512[m]>
There are BMessageRunner class that allow to send BMessage's at specified time intervals.
<x512[m]>
BMessageRunner service is implemented in registrar.
HaikuUser has joined #haiku
<trungnt2910[m]>
> manage users
<trungnt2910[m]>
So when the `id` tool tries to get the username for an ID it calls the registrar?
<x512[m]>
registrar stores a list of timers and send timer messages to sybscribed applications.
<Begasus>
ok, fine without python (or the -Werror patch)
<x512[m]>
s/regisrar/registrar/
* OscarL
can't read a thing on those "(full message at <https://matrix.org/[...]>)". Getting: "Not found [b'matrix.org', b'mfKLHNHeDCfhBtluKtSLIyrX>']"
<Begasus>
that's output from configure OscarL (will be lost once I hit the errors)
<OscarL>
thanks!
<PulkoMandy>
OscarL: you have to remove the >) from the URL, IRC clients don't agree on where an URL should stop
<PulkoMandy>
or convince people to stop using Matrix to join here :p
<OscarL>
PulkoMandy: thanks! was wondering why those links didn't worked now, when they used to.
<dqk>
are you sure it's not your term?
<OscarL>
me? I'm using the same IRC web client since the last few months.
<OscarL>
https://webchat.oftc.net/ <<< doesn't seems to have suffered changes, that I know of. Perhaps on the matrix <-> IRC bridge?
<dqk>
oh, it's a client problem then
<PulkoMandy>
well Matrix could put a space after the URL and there would be less problems. Or make their server accept extra >) at the end of URLs. Or maybe IRC people should agree on how to extract an URL from plaintext and tell Matrix people what characters they should use
<PulkoMandy>
it's a "everyone" problem that no one will fix
<OscarL>
jmairboeck: understood. So it *is* expecting fontforge to have python scripting support, and not merely using Python to script fontforge calls, right?
white-wolf has quit [Remote host closed the connection]
Forza has joined #haiku
CPYou has joined #haiku
selfish has joined #haiku
white-wolf has joined #haiku
<OscarL>
Nice work Begasus :-)
<Begasus>
wasn't that hard (but not tested yet), so added wip label for now ;)
<Begasus>
now checking out with GUI ;)
<Begasus>
no errors on python :D
FreeFull has joined #haiku
smalltalkman has quit []
<nephele>
Begasus: I see you are removing static libs?
<Begasus>
only now nephele ? ;)
<nephele>
Well, I am wondering if that was done to libsdl2 aswell?
<Begasus>
they don't carry the same name for static vs shared library
<nephele>
I'm trying to build something that needs sdl2 and it sais the sdl2 cmake file is broken because it sais there is a static library, but none is shipped
<nephele>
Begasus: probably the problem is the ".self"
<nephele>
it has ""${_IMPORT_PREFIX}/lib/libSDL2main.a"" in the file
<nephele>
no .self there
<nephele>
:)
<Begasus>
This is quite a major one, you should poke korli here ;)
<nephele>
major?
<nephele>
you mean the package?
<Begasus>
yeah, pretty common library (maybe not the static one, but still) :)
<nephele>
yes indeed
<nephele>
I would make a PR and assign korli, but apparently github thinks that assiging someone requires higher permissions.
<Begasus>
not sure there, but I could assign it to him
<Begasus>
or request review from?
frkazoid333 has quit [Ping timeout: 480 seconds]
<nephele>
Assinging requesting review seems to be the same
<nephele>
anyhow, the change doesn't work
<nephele>
somehow i'm ending up with a .self now in the path again?
<Begasus>
I'm not too familiar with relitiveLibDir etc, so would have to do a check myself or you could open an issue for it at haikuports?
<jmairboeck>
$relativeLibDir is just $libDir without $prefix, i.e. "lib" on primaryArch and "lib/x86" on secondaryArch
<Begasus>
ah, thanks for explaining jmairboeck (had some thoughts it would end up in $prefix/lib either way) :)
<nephele>
Okay, now i'm *really* confused. I can't reproduce the cmake file locally, with the standard recipe it produces exactly what is expected
<Begasus>
0_°
<nephele>
but: the build still complains about the faulty path now, with the locally build correct package
<nephele>
I did a textsearch on /boot/system and there is only 2 occurences and they are correct .-.
<nephele>
I
<nephele>
'm gonna reboot
<Begasus>
;)
nephele has quit [Quit: Vision[]: i've been blurred!]
nephele has joined #haiku
<Begasus>
jmairboeck, the fontfore PR doesn't provide the pkgconfig file nor headers in the latest version?
<nephele>
Okay, I have no ideas anymore. The cmake file definetely does *not* include the wrong path, yet it still claims that it does, even after deleting all cmake cache files
<Begasus>
maybe best to create an issue explaining the problems you encounter?
<Begasus>
haven't dealt with SDL(2) in a long while here
<Begasus>
you've got the most recent one too nephele ?
<nephele>
I've build the most recent one, yes
<Begasus>
k, no idea then without looking into it (won't be for today) ;)
CPYou has quit [Ping timeout: 480 seconds]
<nephele>
OH
<Begasus>
building fontforge with GUI is ok, install paths look right (also looking into the CMakeList.txt files), but it still searches for the wrong path when launched from Terminal
<nephele>
now it complains about "/packages/libsdl2-2.26.4-1/.self/lib/libSDL2_test.a" missing
<Begasus_32>
Failed to open hotkey definition file: /boot/system/share/fontforge/hotkeys/default
<Begasus>
ah, that one is removed from the package I saw
<nephele>
so the error changed
<nephele>
but this definition from cmake is where, hmm..
<Begasus>
heh
<nephele>
sdl2testtargets-release.cmake
<nephele>
So, just remove that file?
<Begasus>
no idea, only one way to find out I guess? ;)
<Begasus>
no extraction, went through all commits starting from January ;)
* OscarL
closes the VM for today. Off he goes to read Begasus's report.
<Begasus>
closed one already too OscarL , happy reading
<OscarL>
:-)
Begasus_32 has quit [Quit: Vision[]: Gone to the dogs!]
<nephele>
Begasus: see? that misses the haikuwebkit commit, because i did that properly and not through github web interface :)
<nephele>
I suppose it alters some commits and not others
<Begasus>
yeah, still caught it though ;)
<nephele>
bah, dislike github
<Begasus>
not sure if I missed other commits?
<Begasus>
I know ;)
<nephele>
I don't think so, no
<Begasus>
k, thanks :)
<nephele>
anyway i managed to build irrlichtMT
<nephele>
now to try a recent version of minetest
<Begasus>
name rings a bell, but mind is filled with static libraries atm ^^
white-wolf has quit [Remote host closed the connection]
<Begasus>
was something I wanted to check earlier, slips my mind now :)
<nephele>
well, i'm on it, kinda :P
<Begasus>
latest minecraft works fine according to 3dEyes
<nephele>
Cannot generate a safe runtime search path for target minetest because files in some directories may conflict with libraries in implicit directories:
<nephele>
minetest, not minecraft
<nephele>
what does that cmake error mean? .-.
<Begasus>
yeah got that ;)
<Begasus>
and no idea
<Begasus>
;)
<Begasus>
maybe it's trying to build some library that is already installed in the system?