bugs in 07.03.200 - Mailing list pgsql-odbc
From | Hartmut Raschick |
---|---|
Subject | bugs in 07.03.200 |
Date | |
Msg-id | 3FBB217B.AA82C70D@ke-elektronik.de Whole thread Raw |
List | pgsql-odbc |
Hi, everybody: Now that psotgres 7.4 is out, I decided to move to the next driver version as well. Unfortunately, I found that my earlier postings regarding some enhancements had not found way into the source code. (26.08.03: fixes for psqlodbc-07.03.0100 - part 1 and 2; changes: - EINTR safety for send/recv, - honour ODBCINI env var, - init vars before using them (most prominently in SQLGetPrivateProfileString calls), - avoid those notorious core dumps when logging on hitting "null" data... ) I must have done something wrong submitting them (needed to sign in; post to developers; who knows...)... well... After downloading the new driver source I (again) merged all my fixes/changes into it. When trying to run it, however, I had to realize that it would not work, hangs on mutex_lock. This has been pointed out by others already; see: Eric Hallander, New 0200 ODBC Driver issue?? et al. However, the issiue, IHMO, is way more complicated than what it is presented by him. His fix is another bug, because it just kills the lock info (thus of cause enabling a new lock process) Anyway, this is not what you should do, one sould wait for the lock to be released. Of cause, in this case it will never happen. This is because the driver is buggy. The whole "thread environment" setup seems to be somewhat doubtful. (of cause, all this will happen only when runnig threaded; "configure --enable-pthreads"...): 1) libiodbc will, when requested, shell every driver call w/i a lock; therfore the driver - in principle - only needs to safe- guard it's own data; just like it did before (e.g. conn. array) (I dont knwo about unixodbc...) 2) the PGAPI_x calls in the new driver all seem to be of the flavour ENTER_CONN_CS do_internal_call LEAVE_CONN_CS now; also certain internal funcs are shelled (CC_send_query e.g.) 3) as SQLDriverConnect, e.g., via PGAPI_DriverConnect calls CC_connect, which itself calls CC_send_query to send an initial empty query to test connection/backend response, we have a nice litte self-made, unavoidable dead-lock here. Hm... 4) I just hope, the way these ENTER_x_CS calls are spread over the source code now, that there isn't more of this. 5) I should say, THIS HAS NEVER BEEN TESTED ("configure --enable-pthreads"). As I mentioned above, I have merged my earlier fixes/updates into 07.03.200 and will now work on this issue (as just breaking the lock is no solution). Perhaps disabling all this (except driver-data-safeguarding) will be the 1st step (as I said you can bring libiodbc to shell every driver call). P.S.: Mon pessimisme va jusqu'à suspecter la sincérité des pessimistes. - Jean Rostand (1894-1977), Journal d'un caractère, 1931 -- Hartmut "Hardy" Raschick / Dept. t2 ke Kommunikations-Elektronik GmbH Wohlenberstr. 3, 30179 Hannover Phone: ++49 (0)511 6747-564 Fax: ++49 (0)511 6747-340 e-Mail: hartmut.raschick@ke-elektronik.de http://www.ke-elektronik.de
pgsql-odbc by date: