ACCESS_VIOLATION using ADS Local Server (DBF)

mod_harbour is an Apache module that allows to run PRGs directly on the web !!!

ACCESS_VIOLATION using ADS Local Server (DBF)

Postby ricbarraes » Tue Mar 23, 2021 9:17 pm

hey everybody, I'm not so experienced with ADS, as I said before, so I'm here once again to ask for some help! :D

I'm having troubles with simultaneous requests using DBF tables and the ADS Local server (testing environment)...
when my webservice is processing about 3 requests concurrently which are manipulating the same tables I'm getting a error 6005 ACCESS_VIOLATION callend from DBUSEAREA()


I'm trying to track the problem and found out that from those 3 requests, the first 2 requests were processed as expected, but the third one is unable to open the file and then I get this error I just mentioned...

My function is manipulating the files like that:

Code: Select all  Expand view
caliasage:= NewAlias("PX"+hData['nagenda'])    
   
    USE (  cDirDbf+ "\AGENDA.DBF" ) INDEX "AGENDA"  ALIAS caliasage VIA "ADS" SHARED NEW
    IF NetErr()
        hResponse[ 'success' ] := .T.
        hResponse['cod'] := "7"

        hResponseCrypt['conteudo']:=hb_crypt(hb_jsonEncode(hResponse),AP_GetEnv( "ENCRYPT" ))
        oController:oResponse:SetHeader("Authorization",hCookies)
        oController:oResponse:SendJson( hResponseCrypt )
        RETURN NIL
    ENDIF   

    calias:= Alias(Select(caliasage))
 


newalias() is a function that is creating a Alias dynamically for my table, in order to avoid duplicated alias (advice from Charly)

As I said, I'm using ADS Local Server here in my testing environment, so is there any limitation about the opened tables?
When I'm sending a request that manipulates a table, this request will count as a different "user" (different connection) everytime?
the error in my apache error.log:

Code: Select all  Expand view
Unrecoverable error 6005: Exception error:

    Exception Code:C0000005 ACCESS_VIOLATION
    Exception Address:00007FFB74AB3416
    RAX:0000000000000000  RBX:000001BDA3CAEF60  RCX:000001BDA3CAEF60  RDX:00000000FFFFFFFA
    RSI:0000000000000000  RDI:0000000000000000  RBP:000001BDA3CAEA00
    R8 :0000000000000000  R9 :000001BDA3CAEF00  R10:0000000000000000  R11:00000000122BE5A8
    R12:0000000000000000  R13:000000487FBD6000  R14:0000000000000001  R15:0000000000000000
    CS:RIP:0033:00007FFB74AB3416  SS:RSP:002B:000000487FEFE140
    DS:002B  ES:002B  FS:0053  GS:002B
    Flags:00010213
    Exception Parameters: 0000000000000001 0000000000000024


Modules:

[...]


Called from DBUSEAREA(0)
Called from WS:SALVARCONSULTA(725) in pcode.hrb
Called from __RUNCONTROLLER(9) in pcode.hrb
Called from HB_HRBDO(0)
Called from ZEXECUTE(217) in C:/xampp/htdocs/WSH//lib/mercury/mercury.hrb
Called from TROUTE:EXECUTE(566) in C:/xampp/htdocs/WSH//lib/mercury/mercury.hrb
Called from TROUTE:LISTEN(392) in C:/xampp/htdocs/WSH//lib/mercury/mercury.hrb
Called from TAPP:INIT(139) in C:/xampp/htdocs/WSH//lib/mercury/mercury.hrb
Called from MAIN(16) in pcode.hrb
Called from HB_HRBDO(0)
Called from EXECUTE(70) in ..\source\exec.prg
[Tue Mar 23 17:20:37.854706 2021] [mpm_winnt:notice] [pid 18764:tid 584] AH00428: Parent: child process 9676 exited with status 3221225477 -- Restarting.
Sds,
Ricardo Arraes
ricardo@vfatec.com.br
User avatar
ricbarraes
 
Posts: 55
Joined: Tue Jun 30, 2015 2:26 am
Location: Brazil

Re: ACCESS_VIOLATION using ADS Local Server (DBF)

Postby ricbarraes » Tue Mar 23, 2021 9:38 pm

I was taking a look at the Advantage Local Server documentation and I found this:

The Advantage Local Server allows both single-user and multiple-user access to data files. The Advantage Local Server file that is installed with Advantage client products contains a physical limitation such that only five or fewer users can concurrently access any table.


https://devzone.advantagedatabase.com/dz/webhelp/Advantage9.1/advantage_local_server.htm#:~:text=The%20Advantage%20Local%20Server%20allows,running%20the%20Advantage%20Database%20Server.

Is it the problem?
Sds,
Ricardo Arraes
ricardo@vfatec.com.br
User avatar
ricbarraes
 
Posts: 55
Joined: Tue Jun 30, 2015 2:26 am
Location: Brazil

Re: ACCESS_VIOLATION using ADS Local Server (DBF)

Postby ricbarraes » Tue Mar 30, 2021 11:39 pm

Sds,
Ricardo Arraes
ricardo@vfatec.com.br
User avatar
ricbarraes
 
Posts: 55
Joined: Tue Jun 30, 2015 2:26 am
Location: Brazil


Return to mod_harbour

Who is online

Users browsing this forum: No registered users and 2 guests