29-Jun-2012

wget issue
Doing some investigation for our sales department – doing some useful while being ‘in between jobs’ – I use Steven Schweda’s port of wget. This is a great tool to get the desired data – once you find (or create) a page you can use as a starting point, and find your way around in the possible options.

But accessing one particular site, the program crashes (with local and remote information obscured):

$ wget --output-file="/drive/dirpath/name.log" -
--recursive --level=3 --wait=1 --random-wait -
--directory-prefix="/drive/dirpath" -x -
--ignore-length --max-redirect=20 -
--adjust-extension --no-clobber -
"http://site/begin"
%SYSTEM-F-ACCVIO, access violation, reason mask=00, virtual address=000000007BF06B80, PC=FFFFFFFF81074684, PS=0000001B

Improperly handled condition, image exit forced by last chance handler.
Signal arguments: Number = 0000000000000005
Name = 000000000000000C
0000000000000000
000000007BF06B80
FFFFFFFF81074684
000000000000001B

Register dump:
R0 = 00000000000001EC R1 = 0000000000000000 R2 = 000000007BF06D60
R3 = 000000007BF6B4D0 R4 = 0000000000000000 R5 = 0000000000000000
R6 = 0000000000000000 R7 = 0000000000000000 R8 = 000000000000000A
R9 = 0000000000306D40 R10 = 0000000000000006 R11 = 0000000000316000
R12 = 0000000000000000 R13 = 0000000000000000 R14 = 0000000000306BD0
R15 = 0000000000000001 R16 = 0000000000000003 R17 = 000000007FF80000
R18 = 00000000FDF80000 R19 = FFFFFFFF81C08B48 R20 = 000000007FFF0000
R21 = 0000000000000002 R22 = 0000000000000000 R23 = FFFFFFFFFFFFFFFF
R24 = 0000000037DFD55E R25 = FFFFFFFF824F55C0 R26 = 0000000000000FD2
R27 = FFFFFFFF81C10210 R28 = 0000000000000000 R29 = 000000007ADDB390
SP = 000000007ADDB390 PC = FFFFFFFF81074684 PS = 100000000000001B
%SYSTEM-F-ACCVIO, access violation, reason mask=00, virtual address=000000007BF06200, PC=FFFFFFFF80086930, PS=0000001B

Improperly handled condition, image exit forced by last chance handler.
Signal arguments: Number = 0000000000000005
Name = 000000000000000C
0000000000000000
000000007BF06200
FFFFFFFF80086930
000000000000001B

Register dump:
R0 = FFFFFFFF80381930 R1 = 000000000000001B R2 = 0000000000000003
R3 = FFFFFFFF81CD2920 R4 = 0000000000000001 R5 = 000000007BF6B510
R6 = 000000001000000C R7 = 000000007FF87FC0 R8 = 000000000000000A
R9 = 0000000000306D40 R10 = 0000000000000006 R11 = 0000000000316000
R12 = 0000000000000000 R13 = FFFFFFFF81D4EE18 R14 = 0000000000306BD0
R15 = 0000000000000001 R16 = 000000007BF6B520 R17 = 000000007BF06200
R18 = 0000000000000005 R19 = FFFFFFFF80381430 R20 = 000000007FF87FA8
R21 = 000000007ADDAF8C R22 = 000000007BF06200 R23 = 000000007BF06200
R24 = 0000000000000001 R25 = 0000000000000001 R26 = FFFFFFFF80086A18
R27 = FFFFFFFF81C5CCD0 R28 = 0000000000000006 R29 = 000000007ADDAFD0
SP = 000000007ADDAF80 PC = FFFFFFFF80086930 PS = 000000000000001B
$

Running the program using the --debug option, the log suggests a buffer overflow

...
/drive/dirpath/site-dir/main.html: merge(`http://site/main', `http://site♦
appending `http://site/' to urlpos.

/drive/dirpath/site_dir/main.html: merge(`http://site/main', `http://site♦
appending `http://site-2/' to urlpos.

/drive/dirpath/sit
[End of file]

It really ends in the middle of a site speccification – quite a lot of data is appended to urlpos….

I have signaled it to Steven Scheweda to have a look, and when possible, I’ll try my way around in this program (not really familiar with C, but I’ll manage)

28-Jun-2012

Samba running wild
Did some work (creating a .CSV file from files retrieved from a site using wget (latest version found on the web:

$ wget "-V"
GNU Wget 1.13.4a built on VMS Alpha V8.3.

+digest -https +ipv6 -iri +large-file -nls -ntlm +opie -ssl

Copied the file to my Samba share, had to change my samba password, did so and retrieved the files. Wrong format, so started FTP (WS_FTP v. 12), logged in, tried to change directory, and than found the alpha hang. Was logged in and could do a SHO SYS, found quite a number of processes SMBD*, all of them – and some others – in RWMPB mode: ModifiedPagewriteBusy.
Now the (DECWindows) session hung as well.

Shutdown my PC, but that didn’t help.

Reboot?

Tried another approach first: Started up the other system that normally joins the cluster: Daphne. It booted into the cluster. Did a MC SYSMAN, SET ENVIRONMENT/CLUSTER and DO SHO SYS. Hang in Daphme as well. SHO DEV didn’t work either. So I rebooted Daphne, after the system was restarted I did SHO PROCES/CLUSTER and found the processes in the RWMPB state. Killed the first SMBD* process on the screen: and the second; After that, all these processes went away and the DEcWindows sessions resumed processing.

What caused SMBD to go wild, I don’t know. Checked the logfile and there is quite a lot of information – loosing connection and broken pipes included – at the end.

26-Jun-2012

Oops
I did change the PHP environment from physical to logical (I still need to describe it explicitly, there will be a note on the blog when I’ve done that) and changed the entry in the webserver configuration accoringly – for this blog. Bot I’ve another blog running and my T4-watcher is PHP-based as well. And I forgot about these. So the Trips, Tracks and Travels blog, not the T4-viewer worked….
That has been handled this morning.

22-Jun-2012

PHP update- continued

Mark Berryman sent a new version of PHPWASD.EXE and with that one, I didn’t get an access violation. But there were some other problems as well, that appeared when I switched the environment back to 5.2; I had to do some editing on the main PHP_STARTUP.COM procedure before it all went as expected. After that, the previous PHPWASD for PHP 5.3 still ran into ACCVIO so there surely something wrong with the 5.3.10-kit…

But with WP 2.6.3 there still are these missing end-tags that are causing problems. The first one appears in wp-includes/post.php – any ‘require’d file before hols the tag. in 3.4, the end-tag is missing in most, if not all files.
Since there is no other change in environment but the PHP environment, the suspicion in the parser in PHP5.3 is missing something….

21-Jun-2012

PHP update tried again

Mark Berryman couldn’t reproduce it at his site, so he requested some more data.

I made it easier to switch between PHP versions: since it’s not just PHP_ROOT that needs to be changed, the RTE (PHPWASD.EXE) needs to be changed as well since calling PHP hqas been changed in thus update. I don’t know yet if PHPWASD – as a logical – can be used in the WASD config: worth investigation as well – but some other time….

I did some more investigation in the matter, after changing to PHP 5.3 again; and adapted the WASD configuration so I could run PHP_INFO – and found that the problem seems to lie in included files – even with the current, older WP version. But when experimenting with this, it’s not that simple. A simple file, just echoing something, to be included in PHP_INFO.PHP, works fine, with, or without “?<” tag.

Pushed the results to Mark as he requested, and continued looking deeper.

Next, to make a switch easier, I tried defining PHPWASD as a system logical and use that in the WASD configuration, in stead of a full specification:
$ define/sys PHPWASD CGI_EXE:PHP52WASD.EXE
(the version for PHP 5.2)
and in HTTPD$CONFIG, have the PHP extention execute the file referred to by this logical, instead of a fixed file, by changing the line:
.PHP $CGI_EXE:PHPWASD.EXE
to
.PHP $PHPWASD:
and restarting the webserver.
Accessing PHP_INFO.PHP ran – flawlessly.

So I changed the lines that run this blog likewise:
exec /sysblog/**.php (cgi_exe:phpwasd.exe)/sysblog/*.php \
ods=5 script=syntax=unix script=query=none map=once

to
exec /sysblog/**.php (phpwasd:)/sysblog/*.php \
ods=5 script=syntax=unix script=query=none map=once

and behold: it works – after which I added these lines!

So all I have to do next is add this setting of the RTE execuatble in PHP_STARTUP and swithing bwteen PHP 5.2 and 5.3 is a matter of running the right file….Or even better: have a PHP_STARTUP in the WASD environment, that takes the PHP version as a parameter.

Got an answer: PHPWASD.EXE seems to be the wrong once more…. Since I had 5.3.10 downloaded already, I installed that version instead. Now I get an access violation.

Not much help…. Sent the info back.