Hi Rob
Can you think of any reason birthdaylist.js would just stop working. It was working fine up to yesterday, and wam, it just locks up the system.
You can
see the curser blinking on the remote end, and that's it. It's not throwing any errors, it just locks up everytime.
I have not made any changes or added
anything to the system in several weeks, so I can rule out operator error on my part. I had one new user log in and register 0n 5/13/2022, and I noticed it stopped working after that. I don't see anything in his settings that would cause a problem. He did use a birthdate of 19810101, so I changed that thinking that may be the problem, and no change. I've also tried to use it using the sysop ;EXEC command, and it just locks up the system also. For now I have just removed it, but I'd like to solve the issue. Since it's not throwing any errors, is there a way to debug it that would be easy for me to see what is going on. Thanks in advance.
Re: birthdaylist.js
By: DesotoFireflite to All on Sat May 14 2022 12:29 pm
Can you think of any reason birthdaylist.js would just stop working.
It was working fine up to yesterday, and wam, it just locks up the
system.
And by "the system", I'm guessing you just mean the current node.
You can
see the curser blinking on the remote end, and that's it. It's not
throwing any errors, it just locks up everytime.
Do you get the same behavior when running it using jsexec?
I have not made any changes or added
anything to the system in several weeks, so I can rule out operator
error on my part. I had one new user log in and register 0n 5/13/2022,
and I noticed it stopped working after that. I don't see anything in
his settings that would cause a problem. He did use a birthdate of
19810101, so I changed that thinking that may be the problem, and no
change. I've also tried to use it using the sysop ;EXEC command, and
it just locks up the system also. For now I have just removed it, but
I'd like to solve the issue. Since it's not throwing any errors, is
there a way to debug it that would be easy for me to see what is going
on. Thanks in advance.
No immediate ideas. I probably start adding log() lines to exec/birthdaylist.js and load/birthdays.js to find out exactly where is locking or infinite-looping (more likely).
You can
see the curser blinking on the remote end, and that's it. It's not
throwing any errors, it just locks up everytime.
Do you get the same behavior when running it using jsexec?
Yes, heres a screen print. it gets to the last line, then locks
up the window with the curser blinking a "-" just under the last line.
C:\SBBS\exec>jsexec birthdaylist
JSexec v3.19c-Win32 master/0b34b299a - Execute Synchronet
Compiled Mar 20 2022 05:05:47 with MSC 1929
Loading configuration files from C:\sbbs\ctrl
JavaScript-C 1.8.5 2011-03-31
JavaScript: Creating runtime: 167772160 bytes
Reading script from C:\SBBS\exec\birthdaylist.js C:\SBBS\exec\birthdaylist.js compiled in 0.00 seconds
I have not made any changes or added
anything to the system in several weeks, so I can rule out operator
error on my part. I had one new user log in and register 0n 5/13/2022,
and I noticed it stopped working after that. I don't see anything in
his settings that would cause a problem. He did use a birthdate of
19810101, so I changed that thinking that may be the problem, and no
change. I've also tried to use it using the sysop ;EXEC command, and
it just locks up the system also. For now I have just removed it, but
I'd like to solve the issue. Since it's not throwing any errors, is
there a way to debug it that would be easy for me to see what is going
on. Thanks in advance.
No immediate ideas. I probably start adding log() lines to exec/birthdaylist.js and load/birthdays.js to find out exactly where is locking or infinite-looping (more likely).
Can you give me an example of a good log line. Still learning the js Stuff.
Re: birthdaylist.js
By: DesotoFireflite to Digital Man on Mon May 16 2022 02:37 pm
Do you get the same behavior when running it using jsexec?C:\SBBS\exec>jsexec birthdaylist
JSexec v3.19c-Win32 master/0b34b299a - Execute Synchronet
Compiled Mar 20 2022 05:05:47 with MSC 1929
Loading configuration files from C:\sbbs\ctrl
JavaScript-C 1.8.5 2011-03-31
JavaScript: Creating runtime: 167772160 bytes
Reading script from C:\SBBS\exec\birthdaylist.js
C:\SBBS\exec\birthdaylist.js compiled in 0.00 seconds
Okay, and then it just sits/spins at that point?
No immediate ideas. I probably start adding log() lines to
exec/birthdaylist.js and load/birthdays.js to find out exactly
where is locking or infinite-looping (more likely).
Okay, here's an example (to birthdaylist.js):
log("Loading birthdays.js"); // added
var list = load({}, "birthdays.js", month, day);
log("Loaded birthdays.js"); // added
So when run 'jsexec birthdaylist' here with those added log lines:
Reading script from /sbbs/exec/birthdaylist.js
/sbbs/exec/birthdaylist.js compiled in 0.00 seconds
Loading birthdays.js
Loaded birthdays.js
45 Vertrauen users with birthdays in May:
No immediate ideas. I probably start adding log() lines to
exec/birthdaylist.js and load/birthdays.js to find out exactly
where is locking or infinite-looping (more likely).
Okay, here's an example (to birthdaylist.js):
log("Loading birthdays.js"); // added
var list = load({}, "birthdays.js", month, day);
log("Loaded birthdays.js"); // added
So when run 'jsexec birthdaylist' here with those added log lines:
Reading script from /sbbs/exec/birthdaylist.js /sbbs/exec/birthdaylist.js compiled in 0.00 seconds
Loading birthdays.js
Loaded birthdays.js
45 Vertrauen users with birthdays in May:
Ok, i put the log lines in as you suggested, and the problem seems to be in birthdays.js, as it tries to load birthdays.js then it locks up. see log output below. It never got to the second part.
5/17 03:47:39p Node 1 <DesotoFireflite> Executing external: ?birthdaylist
5/17 03:47:39p Node 1 <DesotoFireflite> Loading birthdays.js
Seeing this, I tried to jsexec c:\sbbs\exec\load\birthdays.js, and it did the same thing, locked up, curser sits and spins.
I just don't understand why the program worked flawlessley for months on end, then stops on the 12th with a new user logs in. Also, I checked, windows did an update late on the 12th also, just discovered this today.
As always, thanks
Re: birthdaylist.js
By: DesotoFireflite to Digital Man on Tue May 17 2022 04:15 pm
No immediate ideas. I probably start adding log() lines to
exec/birthdaylist.js and load/birthdays.js to find out exactly
where is locking or infinite-looping (more likely).
Okay, here's an example (to birthdaylist.js):
log("Loading birthdays.js"); // added
var list = load({}, "birthdays.js", month, day);
log("Loaded birthdays.js"); // added
So when run 'jsexec birthdaylist' here with those added log lines:
Reading script from /sbbs/exec/birthdaylist.js
/sbbs/exec/birthdaylist.js compiled in 0.00 seconds
Loading birthdays.js
Loaded birthdays.js
45 Vertrauen users with birthdays in May:
Ok, i put the log lines in as you suggested, and the problem seems to
be in birthdays.js, as it tries to load birthdays.js then it locks up.
see log output below. It never got to the second part.
5/17 03:47:39p Node 1 <DesotoFireflite> Executing external:
?birthdaylist
5/17 03:47:39p Node 1 <DesotoFireflite> Loading birthdays.js
Seeing this, I tried to jsexec c:\sbbs\exec\load\birthdays.js, and it
did the same thing, locked up, curser sits and spins.
Okay, but with birthdays.js runs correct, it's not going to display anything to the console either. Best to just continue testing by invoking birthdaylist.js.
I just don't understand why the program worked flawlessley for months
on end, then stops on the 12th with a new user logs in. Also, I
checked, windows did an update late on the 12th also, just discovered
this today.
As always, thanks
The next step is to add some log() lines to load/birthdays.js and let me know what's displayed before the hang:
function birthdays(month, day)
{
var u = new User;
log("getting total_users"); // added
var lastuser = system.stats.total_users;
log("got total_users: " + lastuser); // added
var list = [];
month = parseInt(month, 10) + 1;
for(u.number = 1; u.number <= lastuser; u.number++) { if(u.settings&(USER_DELETED|USER_INACTIVE))
continue;
if(u.security.restrictions&(UFLAG_Q|UFLAG_G))
continue;
if(u.birthmonth != month)
continue;
if(day && u.birthday != day)
continue;
log("Adding to list: " + u.number); // added
list.push(u.number);
}
return list;
}
Re: birthdaylist.js
By: Digital Man to DesotoFireflite on Tue May 17 2022 02:51 pm
Re: birthdaylist.js
By: DesotoFireflite to Digital Man on Tue May 17 2022 04:15 pm
No immediate ideas. I probably start adding log() lines to
exec/birthdaylist.js and load/birthdays.js to find out exactly DM>>> where is locking or infinite-looping (more likely).
Okay, here's an example (to birthdaylist.js):
log("Loading birthdays.js"); // added
var list = load({}, "birthdays.js", month, day);
log("Loaded birthdays.js"); // added
So when run 'jsexec birthdaylist' here with those added log lines:
Reading script from /sbbs/exec/birthdaylist.js
/sbbs/exec/birthdaylist.js compiled in 0.00 seconds
Loading birthdays.js
Loaded birthdays.js
45 Vertrauen users with birthdays in May:
Ok, i put the log lines in as you suggested, and the problem seems to
be in birthdays.js, as it tries to load birthdays.js then it locks up.
see log output below. It never got to the second part.
5/17 03:47:39p Node 1 <DesotoFireflite> Executing external:
?birthdaylist
5/17 03:47:39p Node 1 <DesotoFireflite> Loading birthdays.js
Seeing this, I tried to jsexec c:\sbbs\exec\load\birthdays.js, and it
did the same thing, locked up, curser sits and spins.
Okay, but with birthdays.js runs correct, it's not going to display anything to the console either. Best to just continue testing by invoking birthdaylist.js.
I just don't understand why the program worked flawlessley for months
on end, then stops on the 12th with a new user logs in. Also, I
checked, windows did an update late on the 12th also, just discovered
this today.
As always, thanks
The next step is to add some log() lines to load/birthdays.js and let me know what's displayed before the hang:
function birthdays(month, day)
{
var u = new User;
log("getting total_users"); // added
var lastuser = system.stats.total_users;
log("got total_users: " + lastuser); // added
var list = [];
month = parseInt(month, 10) + 1;
for(u.number = 1; u.number <= lastuser; u.number++) { if(u.settings&(USER_DELETED|USER_INACTIVE))
continue;
if(u.security.restrictions&(UFLAG_Q|UFLAG_G))
continue;
if(u.birthmonth != month)
continue;
if(day && u.birthday != day)
continue;
log("Adding to list: " + u.number); // added
list.push(u.number);
}
return list;
}
Heres what I get: I think we found the infinate loop you were talking
about (big sigh)
5/18 11:51:23a Node 1 <DesotoFireflite> Loading birthdays.js
5/18 11:51:23a Node 1 <DesotoFireflite> getting total_users
5/18 11:51:23a Node 1 <DesotoFireflite> got total_users: 286
This section below keeps repeating over and over the same thing till I shut down the system. It won't let me exit.
5/18 11:51:23a Node 2 <DesotoFireflite> Adding to list: 249
5/18 11:51:23a Node 2 <DesotoFireflite> Adding to list: 265
5/18 11:51:23a Node 2 <DesotoFireflite> Adding to list: 270
5/18 11:51:23a Node 2 <DesotoFireflite> Adding to list: 12
This section below keeps repeating over and over the same thing till I shut down the system. It won't let me exit.
5/18 11:51:23a Node 2 <DesotoFireflite> Adding to list: 249
5/18 11:51:23a Node 2 <DesotoFireflite> Adding to list: 265
5/18 11:51:23a Node 2 <DesotoFireflite> Adding to list: 270
5/18 11:51:23a Node 2 <DesotoFireflite> Adding to list: 12
Okay, so it climbs to 270 and then jumps back down to 12? That definitely sounds like a bug.
Okay, so it climbs to 270 and then jumps back down to 12? That definitely sounds like a bug.
Do you mind sending me (ftp or email) your system's user.dat file so I can reproduce and fix the issue? I'll delete it when I'm done. If you're not okay with that, then we can try to work out some other ways of debugging this, but I definitely would like to root-cause and fix it.
Re: birthdaylist.js
By: Digital Man to DesotoFireflite on Wed May 18 2022 12:10 pm
This section below keeps repeating over and over the same thing till
I shut down the system. It won't let me exit.
5/18 11:51:23a Node 2 <DesotoFireflite> Adding to list: 249
5/18 11:51:23a Node 2 <DesotoFireflite> Adding to list: 265
5/18 11:51:23a Node 2 <DesotoFireflite> Adding to list: 270
5/18 11:51:23a Node 2 <DesotoFireflite> Adding to list: 12
Okay, so it climbs to 270 and then jumps back down to 12? That
definitely sounds like a bug.
Please try running 'jsexec userlist' and let me know if you encounter a similar infinite loop. It has very similar logic to birthdays.js.
Re: birthdaylist.js
By: Digital Man to DesotoFireflite on Wed May 18 2022 12:10 pm
Okay, so it climbs to 270 and then jumps back down to 12? That definitely sounds like a bug.
Do you mind sending me (ftp or email) your system's user.dat file so I can reproduce and fix the issue? I'll delete it when I'm done. If you're not okay with that, then we can try to work out some other ways of debugging this, but I definitely would like to root-cause and fix it.
I just sent it to you on your bbs. val_user.zip Thanks
Re: birthdaylist.js
By: DesotoFireflite to Digital Man on Wed May 18 2022 04:30 pm
Re: birthdaylist.js
By: Digital Man to DesotoFireflite on Wed May 18 2022 12:10 pm
Okay, so it climbs to 270 and then jumps back down to 12? That
definitely sounds like a bug.
Do you mind sending me (ftp or email) your system's user.dat file
so I can reproduce and fix the issue? I'll delete it when I'm
done. If you're not okay with that, then we can try to work out
some other ways of debugging this, but I definitely would like to
root-cause and fix it.
I just sent it to you on your bbs. val_user.zip Thanks
Thank you! Was able to reproduce and fix. I'm not sure why it was only your userbase that reproduced it, but it was a legit bug!
Re: birthdaylist.js
By: DesotoFireflite to Digital Man on Wed May 18 2022 04:30 pm
Re: birthdaylist.js
By: Digital Man to DesotoFireflite on Wed May 18 2022 12:10 pm
Okay, so it climbs to 270 and then jumps back down to 12? That definitely sounds like a bug.
Do you mind sending me (ftp or email) your system's user.dat file so I can reproduce and fix the issue? I'll delete it when I'm done. If you're not okay with that, then we can try to work out some other ways of debugging this, but I definitely would like to root-cause and fix it.
I just sent it to you on your bbs. val_user.zip Thanks
Thank you! Was able to reproduce and fix. I'm not sure why it was only your userbase that reproduced it, but it was a legit bug!
Re: birthdaylist.js
By: Digital Man to DesotoFireflite on Wed May 18 2022 03:34 pm
Thank you! Was able to reproduce and fix. I'm not sure why it was only
your userbase that reproduced it, but it was a legit bug!
So I got the bottom of it and there was a bug in load/birthdays.js as well (which caused the issue to *not* occur on systems with at least one deleted or inactive user record). So good find! Thanks for the issue report and patience to work through it.
Sysop: | Chris Crash |
---|---|
Location: | Huntington Beach, CA. |
Users: | 585 |
Nodes: | 8 (0 / 8) |
Uptime: | 28:06:32 |
Calls: | 10,757 |
Files: | 5 |
Messages: | 452,138 |