Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
infernal machines
Oct 11, 2012

we monitor many frequencies. we listen always. came a voice, out of the babel of tongues, speaking to us. it played us a mighty dub.
what is the mechanism by which terminating launchd can render your system unusable without a reinstall?

Adbot
ADBOT LOVES YOU

Cybernetic Vermin
Apr 18, 2005

infernal machines posted:

what is the mechanism by which terminating launchd can render your system unusable without a reinstall?

should have waited until it was safe to turn off your computer :(

Jenny Agutter
Mar 18, 2009


read the explanation in this of why people want to collect blu ray disks to instantly crumble into dust

ymgve
Jan 2, 2004


:dukedog:
Offensive Clock
they didnt even talk about the best part of bluray - the extremely high bitrate

Tankakern
Jul 25, 2007

Jenny Agutter posted:

read the explanation in this of why people want to collect blu ray disks to instantly crumble into dust

BlankSystemDaemon
Mar 13, 2009



Jabor posted:

they're talking about this bit:

which definitely fits within the colloquial meaning of "bricked"
It has a shitload of colloquial meanings, but unless you're going outside of context, it means that something has broken to the point that unless you have JTAG access and a copy of the original firmware to flash with, you might as well start using the thing as a paperweight.

The BSD process model is one of the things macOS inherited from BSD going all the way back to when NeXT was making NeXTSTEP (NeXTSTEPs kernel combined code from Mach from CMU and BSD from UCB); the modern implementation in macOS is from FreeBSD 7 (ie. that's the last time Apple did a major source pull from FreeBSD, and the process model hasn't changed since).

In the BSD process model, the init process (whether it's BSD init found in the BSDs or launchd in macOS, has special handling for either going to single-user mode or shutting down the system.

With all of that said, even if you could kill the init process using SIGKILL, which you can't, sending SIGKILL to a process isn't supposed to alter the binary executable image that's stored on the disk - and if it does, that's a huge bug.

BlankSystemDaemon fucked around with this message at 18:07 on Jan 15, 2022

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

Jabor posted:

they're talking about this bit:

which definitely fits within the colloquial meaning of "bricked"

it is also completely incorrect. if you somehow manage to kill launchd and you need to reinstall the os afterwards, then you needed to reinstall the os before that and just didn't notice until you restarted

Chris Knight
Jun 5, 2002

me @ ur posts


Fun Shoe

Carthag Tuek posted:

turns out macos 10:13 can have a full screen ad that you cant stop w keyboard or mouse

i had to kill it with ssh wtf
um...how

Achmed Jones
Oct 16, 2004



things are getting weird in the secfuck thread

Quackles
Aug 11, 2018

Pixels of Light.


Carbon dioxide posted:

... force quitting a task should not brick your system, come on mac you can do better than that.

infernal machines posted:

what is the mechanism by which terminating launchd can render your system unusable without a reinstall?

Apparently lock files can be left behind on the drive that can halt further progress, even after the system is restarted.

Note that I'm basing this on several peoples' described experiences on the Internet. This may no longer be the case.

BlankSystemDaemon
Mar 13, 2009



Quackles posted:

Apparently lock files can be left behind on the drive that can halt further progress, even after the system is restarted.

Note that I'm basing this on several peoples' described experiences on the Internet. This may no longer be the case.
flock(2) is advisory, and completely optional when doing open() especially when you're just executing the file - so while I'm sure it's possible to set up a theoretical scenario where it's possible that file locking could prevent a system from booting, I'm gonna have to see a post-mortem from an actual system where it's happened before I believe it.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

lock files aren’t always using flock

akadajet
Sep 14, 2003

Subjunctive posted:

lock files aren’t always using flock

flocka locka flame

BlankSystemDaemon
Mar 13, 2009



Subjunctive posted:

lock files aren’t always using flock
lock files exist because bad developers don't use flock(2) or fcntl(2) properly (ie. via the aforementioned library functions or if all else fails, lockf(1))
it's just metadata stored in the kernel and you can't hold a lock if your kernel crashed leading up to this fantasy land scenario we're talking about

i also don't understand how lock files could possibly block kernel device initialization, fsck, mountroot or init/its functional equivalent

Quackles
Aug 11, 2018

Pixels of Light.


Here is the extremely unsubstantiated evidence.

https://www.reddit.com/r/mac/comments/536bg2/help_i_stupidly_deleted_my_launchd_from_my_mac/

https://forums.macrumors.com/threads/accidentally-quit-launchd-process-now-chrome-wont-work.871126/

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

BlankSystemDaemon posted:

lock files exist because bad developers don't use flock(2) or fcntl(2) properly (ie. via the aforementioned library functions or if all else fails, lockf(1))
it's just metadata stored in the kernel and you can't hold a lock if your kernel crashed leading up to this fantasy land scenario we're talking about

i also don't understand how lock files could possibly block kernel device initialization, fsck, mountroot or init/its functional equivalent

You don't understand how software could have been written to attempt to acquire a lock before doing something critical to starting up the user environment?

infernal machines
Oct 11, 2012

we monitor many frequencies. we listen always. came a voice, out of the babel of tongues, speaking to us. it played us a mighty dub.

did you actually read either of those?

hobbesmaster
Jan 28, 2008

Jabor posted:

You don't understand how software could have been written to attempt to acquire a lock before doing something critical to starting up the user environment?

locks should be on a ram disk :colbert:

Quackles
Aug 11, 2018

Pixels of Light.


infernal machines posted:

did you actually read either of those?

Yes. They're kind of patchy, even taken together. Guy #1 seems to have broken his computer during or after a force quit of launchd, while Guy #2's woes may have been caused by one or more filtering softwares he had installed.

That's why I called them "extremely unsubstantiated".

infernal machines
Oct 11, 2012

we monitor many frequencies. we listen always. came a voice, out of the babel of tongues, speaking to us. it played us a mighty dub.
i mean, the second person outright refutes the claim themselves

quote:

so i think launchd had nothing to do with it (other than forcing me to restart). it was all glimmerblocker. in trying to uninstall glimmerblocker completely, i reinstalled it and uninstalled it...which messed up the proxy-whatever (in these grounds i don't know what the heck i'm talking about). so i followed the advice of one post on another site and went to safari>>preferences>>advanced>>change settings... and unchecked "web proxy"
everything is working again! i didn't even know safari wasn't working, but i had also noticed that i wasn't getting any rss feeds downloaded in mail. so it couldn't have been chrome. and now i have chrome back.

both those anecdotes involved killing launchd but only one even resulted in an unbootable system, and that's because they also deleted it

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

very careless of apple to design an operating system that doesn't work without an init process

BlankSystemDaemon
Mar 13, 2009



Jabor posted:

You don't understand how software could have been written to attempt to acquire a lock before doing something critical to starting up the user environment?
you may want to read posts you respond to

carry on then posted:

very careless of apple to design an operating system that doesn't work without an init process
how dare they

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

carry on then posted:

very careless of apple to design an operating system that doesn't work without an init process

they even kinda fixed that. these days the os is installed to a cryptographically signed read-only volume that can only be modified from recovery mode, so the only way to not have an init process is to not have a copy of the os at all.

BlankSystemDaemon
Mar 13, 2009



Plorkyeran posted:

they even kinda fixed that. these days the os is installed to a cryptographically signed read-only volume that can only be modified from recovery mode, so the only way to not have an init process is to not have a copy of the os at all.
this is good for security

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

BlankSystemDaemon posted:

this is good for security

apple walled garden enemies of FREEDOM

Kazinsal
Dec 13, 2011



Plorkyeran posted:

they even kinda fixed that. these days the os is installed to a cryptographically signed read-only volume that can only be modified from recovery mode, so the only way to not have an init process is to not have a copy of the os at all.

hmm. how much space is available on the TPM chip to the OS? I think I have an idea...

e: poo poo, nvm :( "The TPM SHALL support allocation of at least 68 indices, with a total minimum data size of 3834 Bytes (decimal)."

RFC2324
Jun 7, 2012

http 418

carry on then posted:

apple walled garden enemies of FREEDOM

I mean, I modified mine so I could have a neat tiling manager, so its not *completely* locked down

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

BlankSystemDaemon posted:

lock files exist because bad developers don't use flock(2) or fcntl(2) properly

file lock != lock file

lock files are usually just open(O_EXCL | O_CREAT)

Potato Salad
Oct 23, 2014

nobody cares


god drat it beaten ^^^

BlankSystemDaemon
Mar 13, 2009



Subjunctive posted:

file lock != lock file

lock files are usually just open(O_EXCL | O_CREAT)
you didn't say file lock until just then, though

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

BlankSystemDaemon posted:

you didn't say file lock until just then, though

indeed, you are the one who first mentioned file locks as though they were somehow related

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

flock(O_SEAGULLS)

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

BlankSystemDaemon posted:

this is good for security

mostly. the big downside is that it now takes multiple hours to install a security update for safari instead of five minutes and that's gonna reduce how many people are fully up-to-date.

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD
Isn't Safari on the main volume?

spankmeister
Jun 15, 2008






You people are bricking the thread with this endless discussion.

Kesper North
Nov 3, 2011

EMERGENCY POWER TO PARTY
distributed denial of posting

redleader
Aug 18, 2005

Engage according to operational parameters

Captain Foo posted:

flock(O_SEAGULLS)

you'd think that in 2022 they could afford a few more characters in their function names and constants

Progressive JPEG
Feb 19, 2003

byte wise, mutex foolish

Antigravitas
Dec 8, 2019

Die Rettung fuer die Landwirte:

Captain Foo posted:

flock(O_SEAGULLS)

run_away(DISTANCE_FAR)

Adbot
ADBOT LOVES YOU

Chris Knight
Jun 5, 2002

me @ ur posts


Fun Shoe

Captain Foo posted:

flock(O_SEAGULLS)
:mmmhmm:

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply