[Harbour] Help with segfaults with MT and hb_hrbload
Lorenzo Fiorini
lorenzo.fiorini at gmail.com
Mon Feb 1 11:36:12 EST 2010
I'm trying to move an ST http embedded server to MT.
The ST version work since years and it mainly load and execute HRBs.
The problem began if I ask for a multiple request.
What I mean is that:
ab -n30 -c1 http://localhost:8089/test.hrb OK
ab -n30 -c2 http://localhost:8089/test.hrb ERRORS like:
Unrecoverable error 6005: Exception SIGSEGV at address 0x20202020
Called from HRBMAIN(62) in pcode.hrb
Called from PROCESSCALL(617) in ../dbl/httpsrvm.prg
Unrecoverable error 9014: Unsupported VM opcode
Called from HRBMAIN(106) in pcode.hrb
Called from PROCESSCALL(617) in ../dbl/httpsrvm.prg
Unrecoverable error 6005: Exception SIGSEGV at address (nil)
Called from HRBMAIN(106) in pcode.hrb
Called from PROCESSCALL(617) in ../dbl/httpsrvm.prg
Unrecoverable error 6005: Exception SIGSEGV at address 0xd
Called from __MVPUBLIC(0)
Called from PROCESSCALL(453) in ../dbl/httpsrvm.prg
Am I missing sth?
The code is like:
...
elseif cExt == ".hrb"
cBinFile := oServer:cBinRoot + cName + cExt
if !file( cBinFile )
oResponse:Flush( 404, "Not found", "text/html", "404 File: "
+ cBinFile + " not found" )
else
begin sequence with { |e| LogError( e, oResponse, cBinFile ) }
if !empty( pHRB := hb_hrbload( cBinFile ) )
xResult := hrbmain()
if ISCHARACTER( xResult )
oResponse:Flush( 200, "OK",, xResult )
endif
endif
always
if !empty( pHRB )
hb_hrbunload( pHRB )
endif
endsequence
endif
...
best regards,
Lorenzo
More information about the Harbour
mailing list