(["connect_options":2])
When I tried adding the above mapping to my code. Roxen started, but remains unreachable via a webbrowser. But, and this is the strange part, when I change the string literal from "connect_options" to for example "variable", Roxen starts and is available. Isn't this strange?! I know this is the exact cause for the change to occur, since it is truly the only thing that was changes.
Oh, I forgot to mention that I'm NOT EVEN USING the mapping :) . The error/strange behaviour purely results from creating the mapping:
catch { mapping(string:int) tst_opt = (["connect_options":2]); dbconn = Sql.Sql( QUERY(db_string)); };
I didn't get to the part of actually using the mapping yet.
__________________________________________________________ Deze e-mail en de inhoud is vertrouwelijk en uitsluitend bestemd voor de geadresseerde(n). Indien u niet de geadresseerde bent van deze e-mail verzoeken wij u dit direct door te geven aan de verzender door middel van een reply e-mail en de ontvangen e-mail uit uw systemen te verwijderen. Als u geen geadresseerde bent, is het niet toegestaan om kennis te nemen van de inhoud, deze te kopieren, te verspreiden, bekend te maken aan derden noch anderszins te gebruiken.
The information contained in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Please notify us immediately if you have received it in error by reply e-mail and then delete this message from your system. __________________________________________________________
catch { mapping(string:int) tst_opt = (["connect_options":2]); dbconn = Sql.Sql( QUERY(db_string)); };
If that block and this block:
catch { dbconn = Sql.Sql( QUERY(db_string)); };
behave differently, it sounds as the Pike version you use might be a bit trigger happy about optimizing away stuff "without side effects". Only grubba can tell. ;-)
It's the difference between:
catch { mapping(string:int) tst_opt = (["connect_options":2]); dbconn = Sql.Sql( QUERY(db_string)); }; (doesn't work)
and
catch { mapping(string:int) tst_opt = (["variables":2]); dbconn = Sql.Sql( QUERY(db_string)); }; ('works')
Johan Sundström (Achtung Liebe!) @ Pike (-) developers forum wrote:
catch { mapping(string:int) tst_opt = (["connect_options":2]); dbconn = Sql.Sql( QUERY(db_string)); };
If that block and this block:
catch { dbconn = Sql.Sql( QUERY(db_string)); };
behave differently, it sounds as the Pike version you use might be a bit trigger happy about optimizing away stuff "without side effects". Only grubba can tell. ;-)
__________________________________________________________ Deze e-mail en de inhoud is vertrouwelijk en uitsluitend bestemd voor de geadresseerde(n). Indien u niet de geadresseerde bent van deze e-mail verzoeken wij u dit direct door te geven aan de verzender door middel van een reply e-mail en de ontvangen e-mail uit uw systemen te verwijderen. Als u geen geadresseerde bent, is het niet toegestaan om kennis te nemen van de inhoud, deze te kopieren, te verspreiden, bekend te maken aan derden noch anderszins te gebruiken.
The information contained in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Please notify us immediately if you have received it in error by reply e-mail and then delete this message from your system. __________________________________________________________
If I understand you correctly, you have a completely unreferenced mapping (["connect_options":2]) in a Roxen module, and the mere presence of this mapping in memory causes Roxen to misbehave. That'd be exceedingly strange indeed, and (thankfully) I can't reproduce it.
It's even more strange: just adding: string prv = "connect_options"; results in a problem. I also seem to have figured out what exactly the problem is: Roxen keeps on restarting a few times and then freezes.
Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
If I understand you correctly, you have a completely unreferenced mapping (["connect_options":2]) in a Roxen module, and the mere presence of this mapping in memory causes Roxen to misbehave. That'd be exceedingly strange indeed, and (thankfully) I can't reproduce it.
__________________________________________________________ Deze e-mail en de inhoud is vertrouwelijk en uitsluitend bestemd voor de geadresseerde(n). Indien u niet de geadresseerde bent van deze e-mail verzoeken wij u dit direct door te geven aan de verzender door middel van een reply e-mail en de ontvangen e-mail uit uw systemen te verwijderen. Als u geen geadresseerde bent, is het niet toegestaan om kennis te nemen van de inhoud, deze te kopieren, te verspreiden, bekend te maken aan derden noch anderszins te gebruiken.
The information contained in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Please notify us immediately if you have received it in error by reply e-mail and then delete this message from your system. __________________________________________________________
It's even more strange: just adding: string prv = "connect_options"; results in a problem.
I also seem to have figured out what exactly the problem is: Roxen keeps on restarting a few times and then freezes.
Have you run memtest on this machine recently? It behaves as if it is suffering from hardware memory corruption.
It doesn't just happen on one machine. I can reproduce it on my development machine.
Regards,
Arjan
-----Oorspronkelijk bericht----- Van: pike-devel-bounces@lists.lysator.liu.se [mailto:pike-devel-bounces@lists.lysator.liu.se] Namens Johan Sundström (Achtung Liebe!) @ Pike (-) developers forum Verzonden: Tuesday, May 06, 2008 1:40 PM Aan: pike-devel@lists.lysator.liu.se Onderwerp: Re: Very strange string literal problems
It's even more strange: just adding: string prv = "connect_options"; results in a problem.
I also seem to have figured out what exactly the problem is: Roxen keeps on restarting a few times and then freezes.
Have you run memtest on this machine recently? It behaves as if it is suffering from hardware memory corruption.
__________________________________________________________ Deze e-mail en de inhoud is vertrouwelijk en uitsluitend bestemd voor de geadresseerde(n). Indien u niet de geadresseerde bent van deze e-mail verzoeken wij u dit direct door te geven aan de verzender door middel van een reply e-mail en de ontvangen e-mail uit uw systemen te verwijderen. Als u geen geadresseerde bent, is het niet toegestaan om kennis te nemen van de inhoud, deze te kopieren, te verspreiden, bekend te maken aan derden noch anderszins te gebruiken.
The information contained in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Please notify us immediately if you have received it in error by reply e-mail and then delete this message from your system. __________________________________________________________
That's my default way of starting the webserver... It does one coredump after another... Pike 7.4.464
AvS
-----Oorspronkelijk bericht----- Van: pike-devel-bounces@lists.lysator.liu.se [mailto:pike-devel-bounces@lists.lysator.liu.se] Namens Jonas Walldén @ Pike developers forum Verzonden: Tuesday, May 06, 2008 1:45 PM Aan: pike-devel@lists.lysator.liu.se Onderwerp: RE: Very strange string literal problems
Any changes using --remove-dumped?
__________________________________________________________ Deze e-mail en de inhoud is vertrouwelijk en uitsluitend bestemd voor de geadresseerde(n). Indien u niet de geadresseerde bent van deze e-mail verzoeken wij u dit direct door te geven aan de verzender door middel van een reply e-mail en de ontvangen e-mail uit uw systemen te verwijderen. Als u geen geadresseerde bent, is het niet toegestaan om kennis te nemen van de inhoud, deze te kopieren, te verspreiden, bekend te maken aan derden noch anderszins te gebruiken.
The information contained in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Please notify us immediately if you have received it in error by reply e-mail and then delete this message from your system. __________________________________________________________
Done a few minor tests here, to see what does and what does not trigger the problem.
These trigger the problem:
constant prv = "connect_options"; string prv = "connect_options"; mixed prv = "connect_options"; mixed blah->connect_options = 1;
Using #define prv "connect_options"; Does not appear to trigger the problem.
Tested on Red Hat Enterprise Linux ES release 4 (Nahant Update 2).
Hope this helps.
Regards,
Arjan
-----Oorspronkelijk bericht----- Van: pike-devel-bounces@lists.lysator.liu.se [mailto:pike-devel-bounces@lists.lysator.liu.se] Namens Martin Stjernholm, Roxen IS @ Pike developers forum Verzonden: Thursday, May 01, 2008 3:25 PM Aan: pike-devel@lists.lysator.liu.se Onderwerp: Very strange string literal problems
If I understand you correctly, you have a completely unreferenced mapping (["connect_options":2]) in a Roxen module, and the mere presence of this mapping in memory causes Roxen to misbehave. That'd be exceedingly strange indeed, and (thankfully) I can't reproduce it.
__________________________________________________________ Deze e-mail en de inhoud is vertrouwelijk en uitsluitend bestemd voor de geadresseerde(n). Indien u niet de geadresseerde bent van deze e-mail verzoeken wij u dit direct door te geven aan de verzender door middel van een reply e-mail en de ontvangen e-mail uit uw systemen te verwijderen. Als u geen geadresseerde bent, is het niet toegestaan om kennis te nemen van de inhoud, deze te kopieren, te verspreiden, bekend te maken aan derden noch anderszins te gebruiken.
The information contained in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Please notify us immediately if you have received it in error by reply e-mail and then delete this message from your system. __________________________________________________________
Done a few minor tests here, to see what does and what does not trigger the problem.
These trigger the problem:
[...]
Using #define prv "connect_options"; Does not appear to trigger the problem.
Sounds like the presence of the string "connect_options" in the string table causes the problem.
My guess is that you're using a pike 7.4 from before 2008-03-21, when I did the following patch to mysql.c:
---------------------------- revision 1.84 date: 2008/03/21 17:35:52; author: grubba; state: Exp; lines: +4 -3 Fixed NULL-dereference. ----------------------------
*************** *** 359,365 **** socket = PIKE_MYSQL->socket; PIKE_MYSQL->socket = NULL;
! if ((val = simple_mapping_string_lookup(PIKE_MYSQL->options, "connect_options")) && (val->type == T_INT) && (val->u.integer)) { options = (unsigned int)val->u.integer; --- 359,366 ---- socket = PIKE_MYSQL->socket; PIKE_MYSQL->socket = NULL;
! if (PIKE_MYSQL->options && ! (val = simple_mapping_string_lookup(PIKE_MYSQL->options, "connect_options")) && (val->type == T_INT) && (val->u.integer)) { options = (unsigned int)val->u.integer;
simple_mapping_string_lookup() doesn't even look at the mapping if the string isn't in the string table.
Tested on Red Hat Enterprise Linux ES release 4 (Nahant Update 2).
Hope this helps.
Regards,
Arjan
/grubba
pike-devel@lists.lysator.liu.se