"hello world"
article in Tech programming

PERL troubleshooting and debugging hanging camels.

Camel an even-toed ungulate, bearing distinctive fatty deposits known as "humps" on its back. domesticated; camels provide milk, meat, hair for textiles and other goods. A camel is a working animal with tasks ranging from human transport to bearing loads. The term "camel" is derived from Hebrew gāmāl it's meaning derived from the verb root g.m.l, meaning (1) stopping, weaning, going without; or (2) repaying in kind. This refers to the camels' ability to go without food or water, as well as the increased ability of service the animal provides when being properly cared for. You can do a lot with a camel; that is, if someone is properly caring for it. a camel is happy to go without -- weaning and stopping given the chance; they give no humps if you care of them, so never forget a properly cared for ungulate will repay in kind.

How you do handle a perl process that doesn't finish execution? A perl script which never returns, is a hanging camel. It isn't fun to run code that never exits -- modal dialogs, race conditions, deadlocks. It holds up your testing; requires manual intervention, and is generally annoying.

Camels hang around for a great many different reasons.
Perl interfaces many external libraries from other languages like C/C++; the external code itself might be causing the issue. It could also be that the module tries to load an external library and can't find it, popping a dialog. No big deal -- click the button and move on; but it indicates an issue with installation. Manual intervention works, but you've gotta keep poking the camel along. These kinds of issues (while they represent some of the toughest issues) can be reported; and they can be resolved given proper care, maintenance, and collaboration. It does take a village of caring perl developers and testers to resolve such issues; no one has time to do it all...
camels need love
Sometimes camels even die.
bozanga!
Which can happen for a variety of reasons. If you've got a crashing interpreter you're gonna have a bad time.
At least your system is still running; it could have been a ballistic fork bombing camel which does not die: unrelentingly consuming all resources from your system until it ceases to function.
owweee! he bit me. better have a camera ready; no automated test results going to CPAN testers here, take a picture for memories. realize, I was quite lucky to get such a picture. it took a long time and many strange maneuvers to open procexp.exe to see cmd.exe->perl.exe all the way down. pages, pages, pages, and pages of cmd.exe->perl.exe to death. I sadly had to cold boot. tears.

memory leaks, deadlocks, race conditions, and stack overflow; random crashes, linking the wrong libraries together, incompatible binaries, -- BSOD... things we must come to accept.
there are many reasons for these crashes&issues; code authors are not omniscient and code written on one machine will run differently on another machine.
cross-platform deployment is hard.
the only hope of resolving such problems is a strong testing community, providing reports of issues back to authors. feed and caring required.

Many of these issues are not apparent to a majority of perl users. They happily go about their lives on their GNU/POSIX based systems, using the same modules they've always used. I've found a few hanging camels and troublesome issues in Linux/OSX systems, but more often than not, the strange behavior rears it's perl-y teeth in the MSWin32 boxen.


Placing skips around troublesome tests or marking modules as 'OS unsupported' is one way of resolving these issues quickly.
Running Build.PL
OS unsupported
-> N/A
-> FAIL Configure failed for App-MtAws-1.120.

sometimes, marking and skipping make sense. we don't have tty devices on windows. other times, it's because an author isn't interested in supporting the platform. Perl provides a language to span across platforms solving the communities shared needs, camels were not meant to be platform dependent.

This page will serve to document some of the strange behaviors I've seen while hanging out with perl.

cpan.testers.discuss@nntp.perl.org: How do you handle a perl process that never seems to exit? - the hanging camel does not mind. chillin.
perlmonks: To Debug a Hanging Perl Script just "hang in there" - strace, ktrace, kdump, truss...I wish. remember windows isn't POSIX. debug strawberry build; forever.
#81993: Net-Server-2.006 test stuck on Windows - 2.007 still hanging camels.

other troubleshooting perl pages

The Dreaded "Attempt to free unreferenced scalar" - SV 0xDEADBEEF, my heart sinks.
Perl XS modules and CPAN testers - page is a collection of the sometimes mysterious error messages from CPAN testers when compiling XS modules.


camels are content to hang

Camel - Wikipedia



reach out and cooperate; please.

Thought -> machine code; intention laboriously pecked, poked, painstakingly placed.
caring and collaboration; cooperation.
Runs fine on my machine!
All truth is God's Truth. shlomifish.org - Larry Wall: “All Truth is God’s Truth” - Fortune



JFDI
Created: 2014-08-09 16:51:14 Modified: 2014-09-10 04:45:33
/root sections/
>peach custard pie
>linux
>windows
>programming
>random tech
>science
>research


moon and stars



My brain

Visible Dave Project


$$\cos x = \sum\limits_{n = 0}^\infty {\frac{{\left( { - 1} \right)^n x^{2n} }}{{\left( {2n} \right)!}}}$$