-
wiedi
jbk: that works ok, so if you have ideas for what to poke at... :)
-
jbk
also, (I might have missed it), are you trying to use a relatively recent (anything this year) version of smartos?
-
wiedi
yep latest, also tried with a release from 2020 but no difference. We got it installed with disable-ahci so at least we have network but are wondering if there's a trick to enable the module afterwards again?
-
jbk
ok.. so the sata deadlock fix should be there
-
jbk
if I/O keeps timing out, i wonder if something goofy with interrupts is going on...
-
jbk
wiedi: are you familiar with creating boot modules? (e.g. booting w/ custom /etc/system)?
-
jbk
(could also be done w/ kmdb)
-
jbk
i'm wondering if setting sd_io_time to 10, sa_ua_retry_count=3, might be enough to let the system boot w/ the driver loaded (so more direct debugging could occur)
-
sjorge
@jperkin seems it does not compile (anymore), well go-carbon that is the go-carbonapi does
-
sjorge
Don't know enough go to know if it's easy ti fix
-
jperkin
sjorge: am I missing context? fwiw @foo doesn't notify me
-
sjorge
Aha then yes you probably are
-
sjorge
I though we had go-carbon and go-carbonapi in pkgsrc but couldn't find it
-
sjorge
Since it go, I did a simple go get and noticed it doesn't compile, so it probably was never there or it broke at some point
-
jperkin
yeh I don't see it and there's no CHANGES entry for it
-
wiedi
jbk: re boot modules - not really. But with milestone=none we got it far enough to have a shell and run mdb and other things. Loading the driver after booting with disable-ahci=true would still be convenient as that also gives us networking etc.
-
wiedi
For interrupts it looked like this
frupic.frubar.net/shots/43476.png - and
frupic.frubar.net/shots/43470.png which only shows one of the three controller doing something
-
tsoome
do we have some utility function to parse numeric value with units (k,m,g)?
-
sommerfeld
ZFS has zfs_nicestrtonum
-
sommerfeld
(libcmdutil has nicenum which goes the other way, and I believe ZFS has a variant of that as well)
-
rmustacc
tsoome: I was going to rewrite one the other way with some flags recently because I hit the terror of mkfile and it not supporting T.
-
rmustacc
tsoome: What do you want it for? That might be the motivation to get me to get back to that.
-
tsoome
-
fenix
→
BUG 15711: snoop capture into rotating output files (In Progress)
-
sommerfeld
rmustacc: Thanks for pointing me at ulwp_t the other day.
-
rmustacc
Oh yeah? That helping with something?
-
sommerfeld
I think I have a way to replace calls to uselocale(NULL) in libc with a single instruction on i386/amd64.
-
sommerfeld
at the cost of making setlocale() slightly slower.
-
sommerfeld
so curthread->ul_locale would always point at "the current locale", with a separate byte marking whether or not it was a global or thread-local locale.
-
rmustacc
Basically just always return the locale_t from the ulwp_t and iterate over all the threads while calling setlocale() to update the pointer if it was pointing to the global one?
-
sommerfeld
bingo
-
rmustacc
Do you even need the byte?
-
sommerfeld
move the complexity to the place where it doesn't happen often.
-
sommerfeld
that's an open question.
-
sommerfeld
it's needed if you want to preserve existing behavior (which is that setlocale changes the locale in threads that haven't set one themselves)
-
rmustacc
In my head I feel I can get away without it,
-
sommerfeld
and there's a free byte in ulwp_t
-
rmustacc
But I'm not sure how clever I'm being in my head.
-
rmustacc
(I also don't trust my head that much)
-
sommerfeld
I think you need a bit *somewhere*. you could stuff it in the low order bit of the pointer but then the reader has to mask it off.
-
sommerfeld
I didn't see a generic internal flags field in ulwp_t either but I might have missed something.
-
rmustacc
Ah, yeah. I'm a bit off in that if I setlocale() and uselocale(newlocale()) the same thing the latter shouldn't change on a subsequent setlocale().
-
rmustacc
Actually, will they be the same locale_t?
-
rmustacc
Even though they refer to the same data, won't it be a distinct locale_t returned by newlocale()?
-
sommerfeld
you might be able to get away with "if (ulwp->ul_locale == oldlocale) ulwp->ul_locale = newlocale;"
-
rmustacc
The data is cached, but not the locale_t.
-
sommerfeld
i haven't looked too far under the covers yet.
-
rmustacc
I don't think it's worth the clarity cost to save the byte, but I think it's just that with oldlocale being the old global locale.
-
rmustacc
I guess the ulwp_t doesn't have a flags member. Probably worth just sticking this as a bit on one of them.
-
rmustacc
It also makes the post mortum experience smoother.
-
rmustacc
I'll be happy to take a look when you have something. I guess the biggest thing will be to hold all the ulwp's to update.
-
sommerfeld
looks like ulwp_t has a bunch of char-containing-boolean fields.
-
sommerfeld
the code necessary to walk the threadlist is mercifully small.
-
rmustacc
And it's fork safe?
-
sommerfeld
I think so - will have to take a closer look. Might leak locales in the child.
-
sommerfeld
-
sommerfeld
I copied the lock/loop structure from the thread fork hooks so it should play nice with that.
-
rmustacc
Hmm. I guess we'll maybe want to test what happens with racing setlocale / fork.
-
sommerfeld
pubs.opengroup.org/onlinepubs/9699919799/functions/setlocale.html says "The setlocale() function need not be thread-safe." so application expectations are hopefully low...
-
richlowe
a thing to check on top of the standards is whether anyone else's is safe
-
richlowe
because we're firmly in a world now where it doesn't matter if the standard says we can, if nobody else does.
-
sommerfeld
Linux is firmly in the "setlocale() is not thread-safe" camp.
-
sommerfeld
or perhaps more correctly, glibc is.
-
sommerfeld
-
sommerfeld
stack exchange best practice appears to be "don't call setlocale() with a non-NULL locale after you've created a thread"
-
rmustacc
OK, I'm likely worrying too much about this stuff.
-
sommerfeld
there are inherent and likely unfixable data races when the global locale is set.
-
rmustacc
Yeah, I know some of it is unavoidable. But I think if I'm not calling into things that use the locale, one would be forgiven for believing otherwise.
-
sommerfeld
I think we can avoid nasal-daemon-level undefined behavior
-
sommerfeld
I'm considering setlocale() vs thread creation races, to avoid a thread getting stuck with an old global locale.
-
rmustacc
I think as long as you capture it at the time that _thrp_create() does its lmutex_lock of the link lock, you should be good.
-
rmustacc
the thread will be suspended and unable to do anything at that point in time.
-
sommerfeld
actually, yes, that's right. (I didn't see that threads start suspended by default and have to be released).
-
sommerfeld
gotta run for a bit.
-
gitomat
[illumos-gate] 15701 vr: the comparison will always evaluate as 'false' -- Toomas Soome <tsoome⊙mc>
-
sjorge
jperkin ack, I couldn't find the older python one either so I wonder how I was running that at one point. Maybe I somehow compiled it myself.
-
gitomat
[illumos-gate] 15689 nvme: race between detach and removal callback -- Robert Mustacchi <rm⊙fo>