Re: Elogd crashes with: *** stack smashing detected ***, posted by Stefan Ritt on Wed Jan 21 08:45:25 2009
|
Niklas wrote: |
Create a list of elog cookies, and store only these as parameters. Examplef:
int process_http_request(const char *request, int i_conn)
{
...
const char *cookie_list[] = { "upwd", "unm", "elmode", "urem", "wpwd", "apwd", "uname", NULL };
...
...
...
/* store cookie as parameter */
for(i=0; cookie_list[i]; i++) {
if(strcmp(cookie_list[i], str) == 0) {
setparam(str, cookie);
break;
}
}
...
|
I'm not sure if this works, since your test
i < (int) sizeof(cookie)
still will stop parsing cookies if there is one which is too long. So I added your test plus changed the parsing to:
for (i = 0; *p && *p != ';' && *p != '\r' && *p != '\n' ; )
if (i < (int) sizeof(cookie)-1)
cookie[i++] = *p++;
cookie[i] = 0;
The modification is in the curren SVN revision (# 2162). So have a look and check that it works.
|
Re: Elogd crashes with: *** stack smashing detected ***, posted by Niklas on Wed Mar 4 16:32:56 2009
|
Stefan Ritt wrote: |
Niklas wrote: |
Create a list of elog cookies, and store only these as parameters. Examplef:
int process_http_request(const char *request, int i_conn)
{
...
const char *cookie_list[] = { "upwd", "unm", "elmode", "urem", "wpwd", "apwd", "uname", NULL };
...
...
...
/* store cookie as parameter */
for(i=0; cookie_list[i]; i++) {
if(strcmp(cookie_list[i], str) == 0) {
setparam(str, cookie);
break;
}
}
...
|
I'm not sure if this works, since your test
i < (int) sizeof(cookie)
still will stop parsing cookies if there is one which is too long. So I added your test plus changed the parsing to:
for (i = 0; *p && *p != ';' && *p != '\r' && *p != '\n' ; )
if (i < (int) sizeof(cookie)-1)
cookie[i++] = *p++;
cookie[i] = 0;
The modification is in the curren SVN revision (# 2162). So have a look and check that it works.
|
Tried 2178 and I seem to hit some endless loop when I have big cookies. The loop seems to be in this for-loop (from gdb).
I perhaps you should have:
for (i = 0; *p && *p != ';' && *p != '\r' && *p != '\n' ; )
if (i < (int) sizeof(cookie)-1)
cookie[i++] = *p++;
else
break;
cookie[i] = 0;
... Seems to be working for me =)
|
Re: Elogd crashes with: *** stack smashing detected ***, posted by Stefan Ritt on Wed Mar 4 16:41:27 2009
|
Niklas wrote: |
Tried 2178 and I seem to hit some endless loop when I have big cookies. The loop seems to be in this for-loop (from gdb).
I perhaps you should have:
for (i = 0; *p && *p != ';' && *p != '\r' && *p != '\n' ; )
if (i < (int) sizeof(cookie)-1)
cookie[i++] = *p++;
else
break;
cookie[i] = 0;
... Seems to be working for me =)
|
Yepp, you're right. I applied your change to the distribution code.
|
Preset Text, posted by mike cianci on Fri Aug 22 23:10:28 2014
|
I have stripped my config file down to one command: "Preset text = \\ssoelog\elog\templates\test2.txt"
If I type the path "\\ssoelog\elog\templates\test2.txt" into my browser I see the contents of the file, which is the word "YES"
But when I open a "New" page in ELOG the command returns: " \\ssoelog\elog\templates\test2.txt"
Could it have anything to do with the fact that I am using Version 2.7.5 |
Re: Preset Text, posted by Andreas Luedeke on Sun Aug 24 15:06:37 2014
|
Well, I only know that the following config file works fine for me on Linux:
⇄
English (auto-detected) » English
[test]
Attributes = xx
Preset text = /tmp/xx
with the file /tmp/xx containing "test: ignore". When opening a new entry, then the text "test: ignore" is written in the editors text area.
I'm using Version 2.9.2
My suggestion: download the latest Windows Version and try again. |
Elogd crashes, posted by soren poulsen on Wed Oct 22 12:44:48 2008
|
Hi
I am experiencing trouble with Elog crashing. I think it crashes during input operations (new entries are being added).
Are there any preferred methods to troubleshoot this ? Any log files I could look at ?
For now, I let "monit" supervise the process and restart it if it crashes. But I would like to get to the root cause of the problem.
Soren Poulsen
CERN |
Re: Elogd crashes, posted by Stefan Ritt on Wed Oct 22 15:15:46 2008
|
soren poulsen wrote: |
Hi
I am experiencing trouble with Elog crashing. I think it crashes during input operations (new entries are being added).
Are there any preferred methods to troubleshoot this ? Any log files I could look at ?
For now, I let "monit" supervise the process and restart it if it crashes. But I would like to get to the root cause of the problem.
Soren Poulsen
CERN
|
Dear Soren,
sorry for the trouble, but it's very hard to diagnose this remotely. This forum here runs fine for many months, so in principle Elog should be stable (at least the current version 2.7.5). If you have an older version, please upgrade. If you have a way to reproduce the problem reliably, you can send me your config file and explain step-by-step how you make Elog crash. Then I can try to reproduce it here. Otherwise the only chance I see is to run elog from inside the debugger, and once it crashes record the stack trace and send it to me. If you don't know how to use the gnu debugger, I'm sure you find someone at CERN who knows.
Best regards,
Stefan |
Re: Elogd crashes, posted by soren poulsen on Thu Oct 23 08:12:06 2008
|
Dear Stefan,
Thanks for your reply.
I started running elog in February and it never failed. Then it started failing regularly towards the end of September. There were no system changes until then, except the daily automatic Yum updates (SLC4). Then I upgraded to the latest version (tar ball of 2.7.5). Then yesterday it crashed again. I saw that it crashed around the time when a user was doing something - inputting new data. I can monitor when it crashes and correlate it with user activity. But it is not easy to reproduce since I don't know exactly what the user is typing.
It would be necessary to record the user input forms and then replay them against a known server state. But that is not so easy.
I will think about doing something else - maybe running inside a debugger as you suggest.
Soren
Stefan Ritt wrote: |
soren poulsen wrote: |
Hi
I am experiencing trouble with Elog crashing. I think it crashes during input operations (new entries are being added).
Are there any preferred methods to troubleshoot this ? Any log files I could look at ?
For now, I let "monit" supervise the process and restart it if it crashes. But I would like to get to the root cause of the problem.
Soren Poulsen
CERN
|
Dear Soren,
sorry for the trouble, but it's very hard to diagnose this remotely. This forum here runs fine for many months, so in principle Elog should be stable (at least the current version 2.7.5). If you have an older version, please upgrade. If you have a way to reproduce the problem reliably, you can send me your config file and explain step-by-step how you make Elog crash. Then I can try to reproduce it here. Otherwise the only chance I see is to run elog from inside the debugger, and once it crashes record the stack trace and send it to me. If you don't know how to use the gnu debugger, I'm sure you find someone at CERN who knows.
Best regards,
Stefan
|
|
|