-
jpb
yuripv: might be related to the DNS changes malaysia government has mandated. several news sites are reporting backlash. not sure what the current status is.
-
rwp
CCFL_Man, Seems to me that the way to deal with that is zfs redundancy. Either mirroring or raidz such that the system can keep operating even when a device fails such as yours did.
-
rwp
It's possible that a full power cycle will have things back online again. In which case I have in the past kept using things. Because I didn't know if the lockup was due to the drive or the motherboard controller. But I would at least put it in a mirror so that it doesn't bring the machine down.
-
rwp
Assuming it's not a laptop that only has one device. If it is a laptop then I would definitely swap the device out for another one.
-
tuaris
How well does FreeBSD work for running AI inference workloads? Will I be able to run things like ComfyUI and be able to use NVdia GPU's?
-
HER
tuaris: nvidia has freebsd drivers
-
uskerine
hi, how do you check at command line if a file is locked or not
-
rwp
uskerine, For the most part file locks are advisory among coordinating processes only. Very rarely are they mandatory locks. So to answer your question requires knowing what the software is and what locking method it is using.
-
uskerine
advisory
-
uskerine
is there a command line tool to determine advisory locks?
-
rwp
Well it depends upon how something is "locked". Since "lock" is a construct of concept and not a physical thing.
-
rwp
Let's say we have a meeting and our rules say that only the person with the speaker gavel can speak and then we pass the gavel around the chair circle.
-
rwp
In that case we can tell who has the protocol to speak by looking to see who is holding the gavel.
-
rwp
Programming is like that too. A process will cooperate with itself using some method to semaphore the critical section that it is trying to make atomic across multiple processes.
-
rwp
So in the case of mailboxes at /var/mail/$USER it will atomically create a lock file /var/mail/rwp.lock when it is accessing that mailbox.
-
rwp
Nothing requires this as part of the OS. I can at any time run "$EDITOR /var/mail/rwp" and edit my own file. I have the file permissions for it. But that's not the way the protocol is supposed to work.
-
rwp
If I run a mailer then before it edits that mailbox and moves messages out of it then it will atomically create /var/mail/rwp.lock there and if that fails then it knows some other process is accessing that resource.
-
rwp
That's ONE example of a semaphore implementation (which I described because it is well known) but the number of semaphore implementations are many and it depends upon the program.
-
rwp
BBIAB
-
mason
uskerine: I'm unaware of a direct equivalent to lslocks, at present.
-
mason
uskerine: If it were me, I'd whip up a tiny program that does a non-blocking flock(2) and then unlocks if it manages it.
-
rwp
mason, Uhm, If a process is holding an fcntl(2) lock then the way to unlock it is to kill the process holding the lock. The kernel will close all file descriptors and that includes any fcntl(2) locks held by the process. At that time the next process waiting for it will get it.
-
mason
rwp: He wants to know if there is a lock.
-
rwp
Yes but I was reacting to "and then unlocks if it".
-
mason
Oh, I didn't see that bit. Yeah.
-
rwp
Uhm... you wrote that bit! :-)
-
rwp
Probably I read that to mean something different than what you meant when you wrote it.
-
mason
rwp: Oh, I meant the lock checker.
-
mason
Half a sec, just tidying something up.
-
mason
uskerine: Here, this is terrible, buggy, probably wrong, and will make your computer melt, but it's a relatively minimal way to do what you're asking:
bpa.st/Q6MI2
-
rwp
But that program has nothing to do with any type of locking. Paint me as confused.
-
mason
For reasons I evidently lack time to debug I couldn't open a file and then give its file descriptor to flock(2) without error, but since we can get a lock with open(2) on its own, I shrugged and stopped trying to figure out why flock(2) was unhappy. So there's probably an extre include in there.
-
mason
rwp: Sure, it'll return with an error if the file you point it to is locked.
-
rwp
Ah! I missed seeing O_EXLOCK there.
-
mason
bbiab
-
mason
(voting!)
-
debdrup
-
debdrup
The work was done more than two months ago, so maybe I'm also just behind..
-
nicholau104
Howdy, folks!
-
rtprio
hello