#buildprogress
Explore tagged Tumblr posts
Text


Leftovers & layout - WLED board revision A completed!
Sunday night, Babyada went to bed early, so we finished the capture and layout of our WLED board. Thanks to all the suggestions, we were able to implement quite a few!
For power, use USB C PD with switch-select or DC up to 24V; they are diode-OR'd together with PMEG3050
https://www.digikey.com/short/zv22b0pq
into a massive 5A 24V fuse
https://www.digikey.com/short/43qwwtwm
For the 5V regulator, we picked NCP718ASN500T1G
https://www.digikey.com/short/bb9ncc0n
- it's linear, but we don't need a lot of current at 5V. For 3.3V, we went with our trusty TPS54202
https://www.digikey.com/short/c1wnnf94
Upon request, we kept the ICS-43434 I2S microphone
https://www.digikey.com/short/28zwrrhz
and added an IR 38KHz receiver. For external connectivity, there's an ADC/DAC/GPIO #27 breakout on a JST SH 3-pin and I2C on a StemmaQT/Qwiic 4-pin.
We also added a 2x3 breakout header with 3V, GND, and 3 more GPIO so you could connect an external microphone, IR receiver, buttons, or rotary encoder. The terminal blocks have three 5V level-shifted outputs with 100 ohm in-line resistors and power/ground pairs for each. If you need just one more LED strand, the fourth 5V signal is on the 2x3 block.
Rounding out the design are four mounting holes, a reset button, GPIO #0 user button, GPIO LED, and an individual NeoPixel, which could be useful for testing. It's still pretty small, 2" x 1.3". With an ESP32-Mini module, we can pick a PCB or wFL antenna port, and it's an easy swap to make it use an ESP32-Pico, which has 2MB PSRAM.
Whatcha think - anything else we should add or watch out for?
#wled#esp32#electronics#pcbdesign#electronicsproject#makerlife#hardwarehacking#openhardware#diytech#electronicsengineering#usbc#miccontroller#neopixel#iotdevices#irreceiver#powersupplydesign#smalldesign#esp32mini#hardwarelayout#buildprogress#techinnovation
41 notes
·
View notes
Text










Aevinn: “From start to finish”
(Gun design: the_mr_man on instagram)
22 notes
·
View notes
Photo

Buckle Up!!! . . . The brownells, inc. / #YetiBuilt ADR Build - "Stage 3 : Body Fabrication" begins Right Now!!!! ⚡👊🏼⚡ And what do I have setup for a Rad Timelapse of the build to the end but a permanent Action Camera mounted up in the corner that I'll Operate Daily along with all my other cameras going too! 😉🎥 . . .It's about to get interesting!! Especially when Yeti says he's about to "do bad things to this machine!" 😅😅 #StayTuned . . . #BuildProgress #Automotive #Machine #Offroad #Brownells #YetiAndYolo #Jeep #JKU #V8Jeep #LS #Build #AdventureMachine #ADR #Fabrication #HustleAndRoam #Channel #ItBegins #JeepBuild https://www.instagram.com/p/BtPv12DBpP6/?utm_source=ig_tumblr_share&igshid=17zkwyitdllhm
#yetibuilt#staytuned#buildprogress#automotive#machine#offroad#brownells#yetiandyolo#jeep#jku#v8jeep#ls#build#adventuremachine#adr#fabrication#hustleandroam#channel#itbegins#jeepbuild
4 notes
·
View notes
Photo

Realize I never really posted pics from the sword I built for the trunks costume 😅 . there were a few iterations before it got to it's final form. . . . . . . . . . . . . . . #artist #maker #plastic #sintra #sword #dbz #dbzcosplay #dragonballz #dragonballzcosplay #build #buildprogress #vynalwrap https://www.instagram.com/p/CnpXe52ux77/?igshid=NGJjMDIxMWI=
#artist#maker#plastic#sintra#sword#dbz#dbzcosplay#dragonballz#dragonballzcosplay#build#buildprogress#vynalwrap
1 note
·
View note
Photo

Finished airbrushing my muscle suit today. What do you think? #cosplayprogress #costumemaker #costumemaking #buildprogress #whygotothegym #mygym #mymuscles #cosplay #cosplayer #cosplaying #heman #hemancosplay #grayskull #mastersoftheuniverse https://www.instagram.com/p/B4hgu3iDOVZ/?igshid=iaf6eweh7d04
#cosplayprogress#costumemaker#costumemaking#buildprogress#whygotothegym#mygym#mymuscles#cosplay#cosplayer#cosplaying#heman#hemancosplay#grayskull#mastersoftheuniverse
0 notes
Photo

overcast today but I still wanted to take some pictures #2020 #Honda #Civic #si #civicSi #HondaCivic #HondaNation #vtec #hondaoem #FC1 #10thgencivic #jdmlifestyle #jdmnation #jdm #tunerlife #streetlife #buildprogression gonna change some styling real soon...#l #excited (at Otay Lakes) https://www.instagram.com/p/B7zctrnAMNr/?igshid=wvzg8om314r8
#2020#honda#civic#si#civicsi#hondacivic#hondanation#vtec#hondaoem#fc1#10thgencivic#jdmlifestyle#jdmnation#jdm#tunerlife#streetlife#buildprogression#l#excited
0 notes
Text
DIY fans get creative with feature walls – thanks to this £6 must-have
With a steady hand and a bit of patience, plain walls can be transformed into captivating feature walls.
You’ve only got to browse Pinterest and Instagram to see just how creative homeowners are becoming with painting feature walls. Armed with paint and the £6 secret weapon every keen DIY fan knows about – FrogTape!
The growing popularity of geometric walls and mountain-style murals are all made possible because of this easy-to-use tape.
More ideas: 32 Easy DIY projects and fun makes to do for every room in the house!
But just why is it so good? ‘It delivers lovely straight lines, so works really well for box shapes and geometric patterns’ explains Jason Burns, spokesperson for FrogTape UK. You simply tape the areas you want to protect, and paint the rest.
All you need is some paint and roll of tape, and a little bit of inspiration…
View this post on Instagram
Good morning you beautiful lot, I thought I would brighten up your feed and show you what my 8 year old and I got up to yesterday, it’s really added something playful and fun to her bedroom and I think right now a fun injection was definitely needed….creating things has always been very therapeutic for me and I’m finding it even more so now with everything going on…..what things are you doing to cope/feel happier at home? • • • • • #bedroomdecoration #girlsroomdecor #girlsroominspo #geometricdesign #pompomgarland #ceilingdecor #valspar #valsparpaint #flowerdecoration #bedroomdecoration #bedroominterior #interiormilk #mydailyhomesquare #girlsbedroomdecor #realhomes #actualinstagramhomes #actualinstahomes #instabedroom #pinkdecor #floralwall #hangingflowers #paperflowersbackdrop #paperflowerbackdrop #paperflorist #crepepaperflowers #crepepaper #createdtocreate #diyhomedecor #dıy #myinspireddiy
A post shared by Katya-Lifestyle & Interiors (@redbricks_lifestyle) on Apr 9, 2020 at 12:14am PDT
Striking! And the possibilities are endless, if you know how.
How to use FrogTape: Top tips
Image credit: FrogTape
Jason goes on to tell Ideal Home, ‘The key is to make sure your surface is really clean and to plan out your design first.’ He offers his top tips to help perfect your feature wall
Tip 1. ‘Prep the wall ready to paint by cleaning thoroughly first. If needed, use a paint stripper to remove any old finishes/paint.’
Tip 2. ‘Scuff’ any wood in the direction of the grain to dull the shine from old finishes ready to paint over. Wipe the dust away with a tack cloth.’
Tip 3. ‘Plan out your design on the floor or a piece of paper first.’
Image credit: FrogTape
Tip 4. ‘Create your design on the wall using FrogTape Delicate Surface Painter’s Masking Tape. Make sure to rub the tape down well to get a good seal – it goes more opaque as you do. The Delicate surface tape is more gentle to unfinished wood surfaces, FrogTape MultiSurface works well on walls.’
He adds, ‘Tape can be cut carefully into thinner stripes to make narrower strips using a cutting mat, safety ruler and craft knife.’
Tip 5. ‘Paint in the shapes using a flat, soft synthetic brush. Add one to two coats more until the full colour is reached.’
Image credit: FrogTape
Tip 6. ‘Remove the tape slowly and steadily, pulling back on itself.’
Buy now: FrogTape Masking tape, £6, Amazon
FrogTape feature wall ideas
View this post on Instagram
Wow what a weather change for 24hrs. I’m currently still in PJs snuggled under a blanket while the kids play nicely. Going to put the washing away and sort the house today. Try to eat and drink less to end the bank holiday weekend. But it’s currently 8:45 and I am already Hungry
hope you all had a lovely day yesterday. #persimmonshomes #chedworth #chedworthpersimmon #persimmonchedworth #kent #buildprogress #myhomevibe #homeinspo #playroominspo #familyhome #yellowplayroom #firsttimebuyers #housetohome #homeinspo #homeinspiration #playroom #chedworth #ballpit #musturdroom #yellowandgrey #mumlife #geo #frogtape #frogtapewall #myhometrend #myhomestyle #greyandyellow #playroom #ilovemypersimmonhome #mumlife #fulltimeworkingmom #ikeadecor #discoverunder5k #explorepage
A post shared by Chedworth Persimmons (@our_chedworth_journey) on Apr 13, 2020 at 12:53am PDT
Here a playful geometric pattern helps to zone a kids play area. A brilliant use of clever paint effects.
Related: Bedroom paint ideas – paint effects that will make your room unique
View this post on Instagram
CANT BEAT A BIT OF SUNSHINE
. . Have you been out in the garden today ? . . Good evening ! Hope you’re all staying safe ! It’s been a gorgeous day where we are ! I just wish we had a garden to sit out in ! I’m enjoying seeing all your gorgeous garden posts though ! . What’re you all up to this evening ?! We might have a game of monopoly! I haven’t played it in years !! . . . . #Homedecorblogger #homedecor #homestyle #interior #transformation #interiorinspiration #interior4all #homedeign #interior123 #flatlay #interiorstyling #homesweethome #hincharmy #actualinstagramhomes #greyhome #interiorstylist #greydecor #greyinterior #greyhomesofinsta #greyhomes #greyhouse #featurewall #greyhomes #cornerofmyhome #pocketofmyhome #glamdecor #mymodernlook #inspire_me_home_decor #interiorismo #interior4you
A post shared by Mr and Mr Grey’s Apartment (@mrgreysapartment) on Apr 21, 2020 at 11:24am PDT
Clean straight lines, enabled by the precision of using FrogTape, make this striking wall an absolute triumph.
View this post on Instagram
This morning I'm joining in with #myhousethismonth hosted by @littlehouseinlondon, @__itslucy__ and @jonpaulclark and today it's day 18 and paint it.⠀ ⠀ Here is a mural I did in my first flat! I loved this space and the colours were really calming. I chose 4 paint colours and then mixed to create my own paint colours to create the gradual colours in between. This meant that I knew all the colours I created would blend in nicely and be the correct tone. I used @valsparpaintuk for this!⠀ ⠀ Biggest lesson I learn with this was to make sure you seal the mixed paint colours properly so you have them for touch ups later if needed! ⠀ Bed @warrenevansleep leep, bedding @ikeauk .⠀ .⠀ .⠀ #lornasyson #paintcolours #paint #paintyourown #valspar #valsparpaintuk #bedroom #bedroominspiration #bedroominspo #painteffects #paintcolours #designerhome #lovemyhome #homedesign #homestyling
A post shared by Fabric and Wallpaper Designer (@lornasyson) on Apr 17, 2020 at 11:41pm PDT
Rolling hills and mountains are becoming more and more popular by the day – especially in kids rooms.
Read more: Mum takes son’s bedroom to new heights with creative mountain wall mural
View this post on Instagram
Has anyone else’s kids bedrooms been this tidy since lockdown? Nope, mine neither
I feel like a tidy room would be so much nicer for them to spend their time in but they just don’t see it like that, there’s ‘STUFF’ everywhere
. Never mind at least they’re having fun
A post shared by Victoria Willson Interiors (@designmyroombyvictoria) on Apr 27, 2020 at 2:28am PDT
Block colour patterns are less intricate but just as effective for feature walls – as this example proves.
Related: Dining room paint ideas – colours and paint effects to create stylish dining areas
Are you already a fan of this ingenious tape?
The post DIY fans get creative with feature walls – thanks to this £6 must-have appeared first on Ideal Home.
from Ideal Home https://ift.tt/2Lf5FAo
0 notes
Text
A bug, how processes work, a history of FDs and C, forking gotchas, race conditions that aren't and general Insanity.
So I just had a fun bug to track down. Was going to have an early day and just finish up builds for a release, when I hit a bug doing my OSX build. I've had this bug for probably a month, but it was easy to work around so I've been ignoring it. So I decided to fix it, not realizing it'd take 5 hours and the rest of my sanity. This is the true story. No names were changed.
I have a tool called WolfRez, which is a resource compiler. Its kindof like a specialized make : you hand it a directory, and it uses a bunch of rules in the filesystem to run commands on the resources. A lot are just copying to where they should be, but it will also do things like compress YAML and Wexpr files, crush PNGs, encode WAV files as Opus (including adding song tags), compile lua files, etc.
So for example, this rule tells it to crush all .png files it finds, and the one below is compiling .lua files into .luac files:
- inputGlob: "**/Resources/Endless.tek/**.png" rule: pngCrush # no outputExt: dont change the filename - inputGlob: "**.lua" rule: luaCompile notOSTargets: [ android, ios, emscripten ] outputRegexpCapture: ".*(?'capture'\\.lua)$" outputRegexpReplace: ".luac"
A few months ago, I was tired of its performance not being the best, so I had it multithread its jobs. With the 2500 files currently in Endless's resource directory, and Demon (my computer) having 24 cores, you can easily see it can get a massive speedup. And resources are embarassingly parallel - no real interdependencies at the moment or anything. So I added it, using WolfTask (which is a nice easy task system), and with a few mutexes/semaphores added, it worked perfectly!
Well it did on Linux and Windows at least.
OSX had this odd thing where occassionly it would hang. The log would say it was finished (or close to finished), but it would never finish. In debug mode or manual builds it'd be fine for some reason, but when I did my release builds (which is pretty much automated cause I'm lazy) it almost always would just hang. So of course my first thought is a race condition. Some task isn't reporting its completion properly, or two are stomping on each other somewhere.
And if I ran it again (which 95% of the resources were already compiled from the failed run), it'd be perfectly fine finishing the last few. Weird.
So first, lets pull out our trusty helgrind! Helgrind is a module for valgrind which lets it detect race conditions. Helgrind is really slow, but I have my laptop so lets run it on Linux while we're looking on OSX. Maybe it'll point out the race condition and it'll be easy!
Hint: Nope. Took about an hour, pointed out some races between console statements (that arent a problem in practice since they're in error handling) but no easy race problems under Linux. Damn. Must be platform specific.
So time for debugging! With my trusty console statements, I confirmed that the TaskGroup all the tasks were a part of was getting all of them added, yet it was never being completed. Welp, lets start throwing statements inside TaskGroup. Its old code, it probably fell down right?
An hour later : nope. Its old code, but thats cause its good code.
Instead it seems like the handler isn't ever finishing. Errr. what?
auto task = taskSource->createTask([iter,&outputs,&failedDuringBuilding](WolfTask::Task* /*task*/) { auto output = iter.value; BuildProgress progress; progress.currentOutput = iter.index; progress.numberOfOutputs = outputs.count(); // code made it here... but never left buildIfNeeded() if (!output->buildIfNeeded(progress)) { console.error() << "Error when building" << WolfConsole::EndLine; failedDuringBuilding = true; return; } });
Okkkkk so its a bug inside buildIfNeeded() that only happens on OSX RelWithDebInfo sometimes. And causes hangs. And never was an issue before. Weird, but ok - start tracing through that. At this point I had like 600 console statements outputting task pointers and stuff, and a lot of it interleaving (cause console is not thread safe on purpose). Finally narrowed it down to basically two different tasks that seem to not complete : luac tasks (compiles lua files into binary form), and pngcrush tasks (tries to make png files as small as possible). No pattern at all of which specific job though.
So lets do some tracing within the pngcrush rule!
WolfType::Bool PNGCrushRule::runWithAction (Action* action, const WolfYAML::Node& customProperties) { // ... elided : set up params, etc ... // code makes it fine here auto res = RuleHelpers::runProgramWithArguments( pngCrushLocation.ref().filePath().zref(), args ); // and this never returns. return res; }
Ok, so its blaming runProgramWithArguments. Thats just a wrapper around WolfSystem::Process. And WolfSystem::Process is code thats used practically everywhere for a long time, so its gotta be good, right? Well thats where the bug says it is, so down another rabbit hole! Can't make any assumptions about whats good code or not.
So Process is a wrapper around running an external program. 99% of programs (including WolfRez) just uses the nice wrapper function around it which looks like this:
WolfType::Vector<WolfType::String> stdoutVec; WolfType::Vector<WolfType::String> stderrVec; WolfSystem::ExitStatusCode returnValue = WolfSystem::ExitStatusCodeSuccess; // Run the given program, with the given arguments, and store its output // in our vectors. auto res = WolfSystem::Process::runTillFinished( programPath, args, &stdoutVec, &stderrVec, &returnValue );
Pretty simple right? Even get the output back easily. Theirs a lot more control if you need it to run async or whatever, but this will just run till the program finishes, then hand back what it got.
Since I think its a multithreaded issue, lets add a mutex right here! Make it so only one thread at a time can run a process. Slow as hell, but it'd show if its a race issue right? Welp, added it, slowed everything by 20x, and while it didnt happen as often, the hang still happened. Sigh, time to go deeper.
Lets talk about how Process works! Unfortunately, most OS level things for running processes dont work the nice simple way the above API does. Most programmers will know about system() which let you run a program, but you can't get the output from it. And that's about it for C standards of running programs! Amazing isn't it. C++ has a technical group I think working on a better interface, but for now it's OS specific. So you need to go even lower to POSIX/WinAPI. So here's how processes work on UNIX (Windows is similar, but has some core differences : if you want me explain it, send me a msg).
Lets say you want to start a new process with the file descriptors (FDs) (such as stdout/stdin) redirected so your program can read them. Here is the list of things you need to do:
First, you need to create the new process. In POSIX, you use fork() to do this. Fork clones the current process, and tells you if you're the parent or the child. Congratulations on your new process!
Second, you need to redirect your FDs. You use something like dup2() to make copies. In Wolf's Process, we use pipes to talk between the parent[application] and child[what will become the program]. Importantly, dup2 needs file numbers, so you can use something like fileno() to get them.
Lastly, you need to run one of the exec functions (such as execve()). This replaces the current process with the new process image at the given location. If you know of Julie-Su (my IRC bot) that could restart herself, this is how she did it.
So in other terms: its like making a clone of yourself, making sure it knows how to talk, then wiping its memory with whatever you want it to do. Programming is weird.
So now you have a child process running the program you want, along with a pipe to your main process to communicate. In the case of runTillFinished, you then just sit on that pipe select()ing, recording any data from stdout/stderr, and waiting for the pipes to close. Once they're closed, you know the program finished and can return all that juicy information.
Back to the bug, I started adding more console statements within WolfSystem::Process. You can't put much debug things within the child process after fork, since you get rid of your FDs, but the parent process basically ends up just waiting on select() for the child process to call. Cue spending 30 minutes playing with arguments to select's timeout which seem to affect it hanging or not, but ultimately was a red herring. The problem is the child never sends messages to its parent, but it also never closed the pipes even though it finished. Err.. it did finish, right?
While I was in the middle of recompiling for the 30 billionth time, I decided to setup a small script running pstree on the process. pstree is just a simple version of ps which shows a process and its children as a nice tree. On Linux, theirs no distinction between processes and threads (somewhat known as light weight processes), so you can easily watch your program to see how its threading or spawning processes. So open another terminal, and lets do:
while true; do clear; pstree PID; sleep 1; done
Now on OSX, threads aren't processes so they dont show up. But as soon as you fork() (which creates a new process), it shows up in pstree. And even nicer, when you exec it shows the new commandline in pstree! Neat! In retrospect this makes sense, since fork()/exec() is how shells work too.
Within pstree though there were two interesting things that showed up which made me curious.
First, zombie processes show up like (pngcrush). A zombie process is a process which has exited, but hasn't been cleaned up by its parent yet. You'd mostly see them for a split second before they get reaped (yes, those are technical terms). However, 1 or 2 of the stuck tasks were showing up as zombies.
Second, I had quite a few child processes which were still named 'WolfRez'. This only should happen for the few microseconds between the fork() (creating the process) and execve() calls (replacing it with the new process). It definitely should not be hanging in that state, theirs literally 5 lines of code there and no loops or anything for it to get stuck in.
What the heck is going on? So lets pull out our debugger (and not in the normal mode). See, if you're a normal process debugging is easy. You start up your program, and can access all the threads and so on. But a debugger generally doesn't let you get to child processes (or more likely, I don't know how to do it in LLDB). Luckily though, like all good debuggers, we can attach to arbitrary processes! So lets try attaching to things.
Attaching to pngcrush doesn't work at all. Mostly cause its a zombie [yes that took me a while to figure out]. Attaching to the WolfRez child processes work fine, and you can see the entire call stack, even pre-fork! (since the fork() copies everything, it even has its old callstack). However the top is a bit odd - its waiting inside a mutex called from the dup2() lines.
if (dup2(m_stdoutPipes[1], fileno(stdout)) == InvalidPipe) std::cout << "[Process::execAndPipe] Unable to dup stdout" << std::endl;
Now the dup2() is used to duplicate file descriptors. If you want to get the output from the process (say STDOUT, also known as FD1), you need some way to feed it back to your parent program. So the easiest way is to create a pipe. The parent program has one end (call it FD4) and the child has the other (call it FD5). Output from one end moves to the other end, and bam: easy communication! But how do we trick the program to write its output on FD5 instead of FD1? Thats where dup2() comes in. dup2() copies a file descriptor into another FD, making both of them act the same. So you can duplicate FD5 into FD1 and now anything written to FD1 is the same as writing to FD5! Program writes to FD1, ends up in FD5, goes to FD4, and we're good. Goes over our pipe to the parent, allowing storing in the vector, yadda, yadda.
So lets talk a bit more about forking [I'm sure you're excited about Yet Another Tangent]. See, forking and multithreading dont get along. At all. Forking makes a copy of the process's data space, but ONLY the current thread's callstack. All other threads just dissapear in the new space. Its kindof like a camera that takes a normal picture, except it will only show one person (the active one). Everyone else was never there : if they dug a hole, the hole is still there but thats it. So whats bad about this? Consider this: you're a good programmer (cause of course you are!), and you make things thread safe. Therefore, you have mutexes, critical sections, semaphores, and other constructs to make sure multiple threads dont mess with stuff at the same time. So consider this: a thread enters a mutex, locks it, then BAM: another thread forks. Data is copied, but only the thread that forks is in the new process. What happens to that mutex? Well, its still locked! And the thread that locked it can't unlock it, cause it never existed [in the new process's view at least]. So if your new thread now tries to use anything that needs that mutex, welp, you're screwed : the lock is frozen shut. Meet Mr. Deadlock.
Sounds like fun, eh? So theirs some pretty big warnings about not calling things between fork() and execve() if you're multithreaded. You can't guarantee the state of anything at all, because so many things are trying to be thread-safe. Even simple things like malloc() or printf() might use a global lock somewhere, and could get locked. So maybe it's dup2()s fault! After all it doesn't say its async-signal safe (which is what the man pages says is the only guaranteed working functions). But the dup2() thing is used by a lot of better programmers than I, so either:
they have the same issue and never ran into it
its something else.
So after another half hour of messing with things, I finally looked at the LLDB trace a bit closer for the child process.
The mutex being locked is within fileno(). .....What?
fileno() should be a pretty brain dead function. It gets the FD number for a FILE* pointer. See, UNIX always has used integers for FDs, such as FD1 being stdout. However, when it came time to make C portable (especially to Windows), it needs to hide details like that. So C uses FILE* (the same thing functions like fopen() do) as its main file handle. So stdout for example, is a FILE* to remain portable. Luckily on POSIX, they have fileno() to convert from the C form to the actual int code, which other POSIX functions like dup2() want. So fileno(stdout) is an easy way to get the number 1 (since its always file descriptor 1).
Here's glibc's version of the function for an example:
// this code block is GPL from glibc-2.25. // not that theirs any reason to copy it. #define _IO_fileno(FP) ((FP)->_fileno) int __fileno (_IO_FILE *fp) { CHECK_FILE (fp, EOF); if (!(fp->_flags & _IO_IS_FILEBUF) || _IO_fileno (fp) < 0) { __set_errno (EBADF); return -1; } return _IO_fileno (fp); }
Simple! It just accesses the struct backing 'fp', and grabs the fileno from it (with error handling and safety things around it).
Well, until you find out that on OSX, fileno() appears to take a mutex. I'm not sure if its a global mutex or one tied to the FD's backing data, but either way it locks a mutex. The same mutex that output uses. A mutex which quite possibly is locked because another thread before forking was outputting progress information or rules to the screen.
So the events to cause this was basically:
WolfRez runs, starts up multiple tasks [24 on this computer].
One thread outputs to the screen its normal messages. This takes an internal mutex by the OS/standard library.
Another thread starts running a task requiring it run an external program (say luac or pngcrush).
That causes WolfSystem::Process to run, causing a fork(), freezing the mutex closed.
Post fork, the process tries to duplicate stdout. To do that, it needs the number so it calls fileno().
fileno() tries to take the lock that was taken prior to the fork.
And since the fork happened, the lock is frozen and will never be unlocked. Deadlock.
Sigh...
So the fix? POSIX also defines the simple defines STDOUT_FILENO STDIN_FILENO STDERR_FILENO which has the explicit numbers (1 2 3) for the standard streams. Which is all that was needed in the first place. So its an easy change. Rerun everything, and its all perfectly happy now.
And that my friends is why you're not supposed to do anything complex at all between a fork() and its execve(). You get to spend 5 hours with Xcode, lldb, pstree, and man pages. You get to question your abilities, what the hell is happening, and try to remind yourself that computers are supposidly logical. And get to listen to all of She's albums over and over and over. On the plus side though, learned a TON about how lldb works, and way too much about how OSX works. Now to forget it all, because after all : programming is about solving problems, then having them nicely wrapped so you can forget it all.
Programming in a nutshell : 5 hours of work for 5 seconds of typing to fix it. And the fix was something you should have done in the first place.
Now for some 酒 and some massively needed sleep.
0 notes
Photo

pedal graphics level: neophyte #diy #guitar #pedal #effect #gristleizer #throbbinggristle #stompbox #art #paint #custom #buildprogress http://ift.tt/2pntTyL
0 notes
Photo

We love doing these pics! Look Vince and Tori, you have a slab!! #wherearewenow #buildprogress #newhomepurchase http://ift.tt/2mHgmO1
0 notes
Photo

NETF: Watching fusion powerplant buildprogress makes nanos hungry. Watching fusion powerplant buildprogress makes nanos hungry.
0 notes
Photo

Been a bit forgetful lol but the before then after of the swords evolution. . . . . . . . . . . . . . #animenyc2022 #anime #nyc #animenyc #cosplay #cosplayers #dbz #zfighters #futuretrunks #futuretrunkscosplay #handmade #upcomingartist #upcycle #upcycled #sword #zsword #onepiece #blerd #maker #artist #plastic #sintra #sword #dbzcosplay #dragonballz #dragonballzcosplay #build #buildprogress #vynalwrap https://www.instagram.com/p/Cnw-4XUOvWp/?igshid=NGJjMDIxMWI=
#animenyc2022#anime#nyc#animenyc#cosplay#cosplayers#dbz#zfighters#futuretrunks#futuretrunkscosplay#handmade#upcomingartist#upcycle#upcycled#sword#zsword#onepiece#blerd#maker#artist#plastic#sintra#dbzcosplay#dragonballz#dragonballzcosplay#build#buildprogress#vynalwrap
0 notes
Photo

Yet another 'Mog mockup. Front springs and axle are on, as is torque tube/ transfer case. Rear spring perches are curing in the foreground. #revell #unimog #modelcars #modeltrucks #buildprogress
3 notes
·
View notes
Photo

Our house is nearly at lockup stage. Can't wait to see it in person. #BuildProgress #buildingfrom3500kmaway #HobartToPortDouglas
0 notes