#4 Race problem

closed-works-for-me
Bengt Gunne
None
5
2004-04-23
2004-04-14
Ulf Werner
No

Hi,

I'm using MPM 1.2.1 against MS SQL Server using plugins
oledb/odbc and the filter ParameterMarkers. When I let
two threads make simultaneous access to the database
I occasionally, but with high repeatability, get various
exceptions mostly at
System.Data.OleDb.OleDbDataReader.ProcessResults
(Int32 hr)
but sometimes also at other points.
I am running my application on a 2 CPU PC and
interestingly, if I set the process to use only 1 CPU the
problem apparantly disappears.

I attach a textfile with some typical exception stacks.

Regards
Ulf Werner
Decerno

Discussion

  • Fredrik Ĺlund
    Fredrik Ĺlund
    2004-04-15

    • assigned_to: nobody --> mimerbg
     
  • Fredrik Ĺlund
    Fredrik Ĺlund
    2004-04-15

    Logged In: YES
    user_id=897766

    Ulf,
    Have you tried using the Sql plugin? If not, can you do it
    to see if you get the same error. Generally you will be
    bettor of with the Sql plugin when working with SQL Server.

    /Fredrik

     
  • Bengt Gunne
    Bengt Gunne
    2004-04-16

    Logged In: YES
    user_id=895705

    I have analyzed the stack traces provided. Some tracebacks
    clearly showed the parametermarkers filter was not thread
    safe (index outside bounds and out of range). This may also
    be the cause of the other failures as they seem to be related
    to SQL compilation (invalid object name, incorrect syntax, ...).

    I have made the parametermarkers filter thread safe, so
    please check if this helps out all or some of your problems.
    Change is in CVS.

     
  • Ulf Werner
    Ulf Werner
    2004-04-23

    • status: open --> open-works-for-me
     
  • Ulf Werner
    Ulf Werner
    2004-04-23

    Logged In: YES
    user_id=1021053

    Hi,

    Thanks for prompt response to the race problem. It seems to
    be solved now. I have run my testloop 400 cycles in 4 parallell
    threads and I have seen no problem.

    /Ulf

     
  • Bengt Gunne
    Bengt Gunne
    2004-04-23

    • status: open-works-for-me --> closed-works-for-me