Previous Thread
Next Thread
Print Thread
Stack Overflow #37045 02 Feb 24 07:10 PM
Joined: Nov 2006
Posts: 2,192
S
Stephen Funkhouser Online Content OP
Member
OP Online Content
Member
S
Joined: Nov 2006
Posts: 2,192
I had a customer report a stack overflow in their invoice email program. Typically they only send invoices for today and the last business day, and this does not result in a stack overflow. On the first of each month, they run this with the start date set for the previous month's 1st day. i.e. (yesterday the start date was 1/1/24) This is apparently, to verify all invoices were sent for the month.

The customer server is EL7 Version 6.5.1734.3. I've tested up to A-Shell 7.0.1754.0 with the stack overflow occurring in every version.

I added NOTRACE=TRIM,FILL,STRIP to the miame.ini

I've attached the ashlog and LSX of the 3 apps referenced in ashlog.

As an aside, maybe this should be a separate thread, I tried 7.0.1754.3 and MySQL doesn't work. We're using libashmysql 1.5.145. Is it required to update that to update that to use 7.0.1754.3?

Unable to load
libashmysql.so.1: cannot open shared object file: No such file or directory

Code
lrwxrwxrwx 1 root root 62 Feb  1 13:49 /usr/lib/libashmysql.so.1 -> /var/data/cvear/ashell/vm/miame/bin/libashmysql.so.1.5.145.el7



Attached Files
invemail_cmpinf_overflow.7z.gpg (607.6 KB, 3 downloads)
SHA1: 0d5cddf31ef80e5e429caf387ef237c4eae440ce
Last edited by Stephen Funkhouser; 02 Feb 24 07:49 PM.

Stephen Funkhouser
Diversified Data Solutions
Re: Stack Overflow [Re: Stephen Funkhouser] #37046 02 Feb 24 07:50 PM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
According to the ashlog and lsx file, the stack overflow is occurring on a file open operation, which 99% of the time is because you've exceeded the open file limit set in the MIAME.INI FILES directive.

Admittedly, "stack overflow" doesn't seem like the right error for this condition but it's a holdover from the fact that the original set of AlphaBasic errors didn't include a dedicated number for this condition, and it's not clear that adding a new error # now will be much help. What would help is if an additional clarifying message was output to the ashlog along with the "stack overflow" error. I'm going to put that on the to-do list.

As for the MySQL connector problem, yeah, that probably should be another topic (not least because I need to investigate the problem further). Offhand I'm not sure why the 1.5.145 version wouldn't work, but there have been a number of changes to the connector leading up to 1.6.149, which would be the recommended version to go with now..

Re: Stack Overflow [Re: Stephen Funkhouser] #37049 02 Feb 24 09:52 PM
Joined: Nov 2006
Posts: 2,192
S
Stephen Funkhouser Online Content OP
Member
OP Online Content
Member
S
Joined: Nov 2006
Posts: 2,192
I couldn't find a maximum for the FILES= in the docs. What is that out of curiosity?


Stephen Funkhouser
Diversified Data Solutions
Re: Stack Overflow [Re: Stephen Funkhouser] #37051 02 Feb 24 10:10 PM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
It specifies the size of the file table, ie the max number of files that can be opened at once, defaulting to 40 std files and 40 ISAM files. If you click on the word FILES in my post above it should take you to the topic in the doc.

Re: Stack Overflow [Re: Stephen Funkhouser] #37053 02 Feb 24 10:15 PM
Joined: Nov 2006
Posts: 2,192
S
Stephen Funkhouser Online Content OP
Member
OP Online Content
Member
S
Joined: Nov 2006
Posts: 2,192
Correct, but I didn't see a specific value that is the maximum supported value. I suppose FILES=100000,100000 would be allowed, but possibly reduced by the operation system limits?

On EL7 that's /etc/security/limits.conf

Last edited by Stephen Funkhouser; 02 Feb 24 10:21 PM.

Stephen Funkhouser
Diversified Data Solutions
Re: Stack Overflow [Re: Stephen Funkhouser] #37054 02 Feb 24 10:23 PM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
Sorry, misunderstood. There isn’t any explicit limit (other than available memory), but the idea of being forced to set one was primarily to catch bugs caused by failing to close files appropriately. So it just depends on what seems reasonable for your app. 40 is probably enough for most apps, but may 2000+ might be necessary for others. Note that the FOPENS trace will help you see the actual opens and accumulation of them.

Re: Stack Overflow [Re: Stephen Funkhouser] #37083 09 Feb 24 02:30 PM
Joined: Nov 2006
Posts: 2,192
S
Stephen Funkhouser Online Content OP
Member
OP Online Content
Member
S
Joined: Nov 2006
Posts: 2,192
FYI, this was indeed caused by a couple of confounding bugs in our software that resulted in exhausting the limit of open files. Thanks for help


Stephen Funkhouser
Diversified Data Solutions

Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3