Misc 4.3 Issues

General development discussion.

Moderators: Susan Smith, admin, Gabriel

Post Reply
mluchterhand
Posts: 52
Joined: Mon Jun 08, 2009 7:28 pm
Location: Des Moines, IA
Contact:

Misc 4.3 Issues

Post by mluchterhand »

Hi Everyone,

We recently upgraded from 4.1 client server to 4.3 client server. Linux Red Hat server. Windows 7 clients. For the most part everything has went pretty smoothly but there are a few little things I would like to address if possible and I'm wondering if anyone has seen these issues:

Cursor
The cursor on the latest version seems to be a solid black box. On our previous version it was a vertical line. The cursor itself is not a big deal but it seems to leave its markings on the screen. It looks very tacky. Can I either change the cursor or is there a way to stop it from leaving the leftover display? I have attached an image so you can see what I am talking about as it is difficult to explain in writing.

Speed
The initial logon of 4.3 is extremely slow. It took maybe 5 seconds with 4.1 for the initial logon. Now it is closer to a full minute. I am not sure if this is just something to do with the nature of having reconnect or if it is something with the operating system itself.

Also in the speed category, the console is extremely slow. The scrolling through lines of codes is night and day difference compared to that of 4.1.

All other programs/etc run pretty smoothly speed wise. Just not sure where to look to troubleshoot either issue.

BR Assertion Errors
Users are also reporting BR Assertion errors. Specifically brassertion (lengths) failed in ../../brs/remoteargs.cpp line 47. This error completely crashes BR. The problem seems to be random and from what I can tell occurs during system calls from libraries. With logging, I have been able to capture a few samples (e-mail addresses masked with x's for privacy):

(8) Wed Apr 8 14:50:41 2015
charlott Wsid: 111 ibs\libcommon.br Line:19200
Command entered sys /usr/local/bin/sendEmail -t xxxxxxxxx@xxxmfg.com,xxxxxxxx@xxxmfg.com -f xxxxxxxx@xxxwnlease.com -l /usr/br/parmas/emaillogcharlott.txt -u 'Contract Invoice 613' -m 'Your BTL lease invoice is attached.' -a ls-inv.pdf
(0) Wed Apr 8 14:50:45 2015
charlott Wsid: 111 ibs\libcommon.br Line:19200
Fatal error called with message: brassertion (lengths) failed in ../../brs/remoteargs.cpp line 47.

(8) Wed Apr 8 15:12:45 2015
matt Wsid: 181 ibs\libcommon.br Line:19200
Command entered sys /usr/local/bin/sendEmail -t xxxxxxx@xxxdsm.com,xxxxxxxxxx@xxxdsm.com -f xxxxxxx@xxxwnlease.com -l /usr/br/parmas/emaillogmatt.txt -u 'Contract Invoice 617' -m 'Your BTL lease invoice is attached.' -a ls-inv.pdf
(0) Wed Apr 8 15:12:49 2015
matt Wsid: 181 ibs\libcommon.br Line:19200
Fatal error called with message: brassertion (lengths) failed in ../../brs/remoteargs.cpp line 47.

The program seems to be erroring at line 19200 in my libcommon library. Line 19200 is simply EXECUTE EMLCMD$ where EMLCMD$ is equal to "sys /usr/local/bin/sendEmail -t xxxxxxxxx@xxxmfg.com,xxxxxxxx@xxxmfg.com -f xxxxxxxx@xxxwnlease.com -l /usr/br/parmas/emaillogcharlott.txt -u 'Contract Invoice 613' -m 'Your BTL lease invoice is attached.' -a ls-inv.pdf" in the first example above. The customer is getting the e-mail so the crash seems to be happening right after the command is executed. I use this part of the library to send hundreds of e-mails per day and I can not figure out a rhyme or reason as to why it seems to crash BR randomly. I can execute the same exact command (to the same people with the same attachment) through the same library call at a later time and not get the error. Further, I used the same library in 4.1 and never got this error to my knowledge.

Thanks in advance for any help/suggestions.
Attachments
br_over_example.jpg
br_over_example.jpg (60.06 KiB) Viewed 20973 times
Last edited by mluchterhand on Wed Apr 08, 2015 3:45 pm, edited 5 times in total.
Thanks - Matt Luchterhand
gordon
Posts: 358
Joined: Fri Apr 24, 2009 6:02 pm

Re: Misc 4.3 Issues

Post by gordon »

Hi Matt.

A couple of things you may want to keep in mind:
  • In 4.3 the cursor switches between block and vertical line based on whether you are in overtype or insert mode.
    If you are in insert mode it appears as a vertical line.
    If you are in overtype mode it becomes a block cursor.

    BR is using native Windows controls in 4.3 which repaint the window each time a line is scrolled. This is much slower than a system where scrolling is supported by via the hardware. Bottom line.. in the actual applications don't scroll. Use the multiline text boxes, Lists and GRids to present multiple lines of data.

    The startup time for BR 4.3 may be a tad longer than 4.1, but it should not be anywhere near a minute. It may be that your DLL was updating or something else was going on. Did you switch from standard model to client server when you switched to 4.3?
Gabriel
Posts: 412
Joined: Sun Aug 10, 2008 7:37 am
Location: Arlington, TX
Contact:

Re: Misc 4.3 Issues

Post by Gabriel »

Regarding the speed, if only a couple specific programs run a lot slower and most of the rest run normally, you could try running the BR profiler on those programs to see which lines are causing the delay. Comparing the profiler results under BR 4.1 with the profiler results under BR 4.3 could help to figure out what command in BR 4.3 is running much slower then usual.

Regarding the graphical glitches and the other issues, hopefully Gordon can address these somehow. I don't know anything to suggest there. Maybe he will connect to your computer remotely and see the issues.

Gabriel
GomezL
Posts: 258
Joined: Wed Apr 29, 2009 5:51 am
Contact:

Re: Misc 4.3 Issues

Post by GomezL »

I had not noticed the performance differences inside the console, mainly because I completely rely on an external editor like MyEdit or Notepad++.

With Client Server, screen IO now crosses the network, so it's much better to minimize the amount of screen output. Our application has a "Startup.wb" that performs quite a few tasks. I setup my software over a WAN, and improved startup from over 7 minutes to about 30 seconds. (Running BR in Client server over a slow connection requires "Tweaking").

Attached is Perform43.wb, a little utility that tests various performance components. You might have to load it in source to run in 4.1, but I wrote it to better understand the performance differences between 4.1 & 4.3. Somethings are faster in 4.3, some things are slower.

I maintain a BR page with helpful tools:
http://luisgomez.net/br/

In 2007, I presented the profiler, and shared my samples and code. It leverages the BR Profiler.
In it I provide an example "Pro-Slow.wb", that takes 30 seconds to run. I also provided Pro-Fast.wb, this version takes 1 second.

It occurs to me that there must be some problems in the WBCONFIG.SYS, for example mapping to "non existent" or "Access Denied" locations. BR supports extensive logging, that might help to identify the problems.

If you haven't already, think about migrating your application to Client Server. There is a huge performance benefit, and as a side benefit, it really cuts down on corruption due to network issues.

Luis
Attachments
PERFORM43.wb
(12.58 KiB) Downloaded 624 times
mluchterhand
Posts: 52
Joined: Mon Jun 08, 2009 7:28 pm
Location: Des Moines, IA
Contact:

Re: Misc 4.3 Issues

Post by mluchterhand »

Thank you for the feedback everyone!

Gordon
My concern isn't that the cursor is different for overwrite just that it leaves its markings on the screen. The marking sometimes remain even after chaining to new programs and PRINT NEWPAGE statements so they can be a little annoying sometimes. Unfortunately using insert mode isn't an option as a lot of our older programs use PRINT FIELDS then INPUT FIELDS for default prompts so the users need to be using overwrite.

Okay that makes sense as to why the console scrolling is slower in 4.3. Like Luis, I use an external editor for most programming. I only use the console occasionally at a users workstation when trying to troubleshoot errors - definitely something I can live with.

I was using client server in both 4.1 and now 4.3. Our 4.3 server has much more processing power and memory so that is why I was shocked by the significantly longer initial login time. I thought it might have something to do with user authentication but when logging in through SSH the user is logged in immediately to the command line. I would think that would be slow as well if it was related to the OS authenticating the user.

Gabriel
It is not so much that the programs are slow, just the initial logon. I do have a few slower programs in 4.3 but the initial login is my main concern. The user is prompted for a username and password almost immediately after launching the client. They supply their credentials and it is almost a minute for most users before the initial startup program appears. This occurs both over a LAN and WAN with the WAN taking a few seconds longer as expected. LAN logins on the previous 4.1 version took maybe 2 seconds.

Luis
Thank you for that utility! That will be extremely helpful in some of my slower programs. Also appreciate the link! Nice to have an additional help tools at my disposal.

I set the logging level to 13 and have attached my various log files. I don't see anything out of the ordinary but my experience with this type of troubleshooting is minimal. The listenerlog seems to be the most helpful but it doesn't have time stamps so not sure where the long delay may be occurring. Right now I'm leaning towards something to do with SSL.

Note
I added another issue (brassertion errors) to my original post that has popped up recently in 4.3. If anyone has any suggestions there I would appreciate it.
Attachments
loginlog.txt
(2.01 KiB) Downloaded 611 times
listenerlog.txt
(1.55 KiB) Downloaded 619 times
errorlog.txt
(141 Bytes) Downloaded 583 times
Thanks - Matt Luchterhand
mluchterhand
Posts: 52
Joined: Mon Jun 08, 2009 7:28 pm
Location: Des Moines, IA
Contact:

Re: Misc 4.3 Issues

Post by mluchterhand »

Update on Original Problems
Out of curiosity and frustration I updated the Operating System on our server from Red Hat 6 to CentOS 7.

This seems to have solved the problem of the long delay after supplying credentials.

The cursor remnants problem remains.

The BR Assertion problems remain. Would appreciate any feedback on this.

Thanks again for any feedback.
Thanks - Matt Luchterhand
bluesfannoz
Posts: 291
Joined: Fri Jun 19, 2009 9:01 am
Location: Lawrence, Kansas
Contact:

Re: Misc 4.3 Issues

Post by bluesfannoz »

Matt I have not really done a lot of work in 4.3. But have had a lot of experience with client server. I would recommend using F2 on a machine recieving the BR assertion error to determine the exact Execute Sys statement that caused the error. Copy and paste that in the command line so that you can duplicate the error. I would make sure the user you used to login in to BR has authority to run the system call you are making and permissions to write to whatever folders are accessed. BR assertion errors are usually related to lack of permissions to perform some piece of the action requested.

HTH!

Steve
Steve Koger
Computer Specialist
SEKESC-MACS Division
mluchterhand
Posts: 52
Joined: Mon Jun 08, 2009 7:28 pm
Location: Des Moines, IA
Contact:

Re: Misc 4.3 Issues

Post by mluchterhand »

Steve,

As BR crashes immediately after issuing the command I am unable to press F2. By adding pauses/etc in my code I have determined it is this line of code:

EXECUTE "sys /usr/local/bin/sendEmail -t xxxxxxxxx@xxxmfg.com,xxxxxxxx@xxxmfg.com -f xxxxxxxx@xxxwnlease.com -l /usr/br/parmas/emaillogcharlott.txt -u 'Contract Invoice 613' -m 'Your BTL lease invoice is attached.' -a ls-inv.pdf"

I can run that exact command from a Linux command line with the user that received the error and it works fine. In fact, BR is issuing the command fine as the customer is receiving the e-mail fine - BR is just crashing intermediately after.

The strangest part is the command works fine about 95% of the time. We use this same call hundreds of times per day with no issues. Those 5% that fail are causing huge issues though. The only thing that changes in the command is the receiving e-mail address or invoice type. The syntax is identical.

Permissions of my entire BR folder as well as the sendEmail program are 777 (read/write/execute).

I'm thinking if it was a permissions issue it would fail every time not just 1 out of 20. Plus I can issue the command from Linux with no errors so I'm leaning towards a memory issue or something.
Thanks - Matt Luchterhand
bluesfannoz
Posts: 291
Joined: Fri Jun 19, 2009 9:01 am
Location: Lawrence, Kansas
Contact:

Re: Misc 4.3 Issues

Post by bluesfannoz »

If you know the command it takes. I would write a simple program that repeatedly runs that command until you receive the assertion error. See if there is a pattern to the number before it does it. You might log 'status mem' to a file between each attempt so you can see memory usage numbers. Also you might have Task manager open on both the workstation and whatever similar there is on your linux server so you can monitor memory usage of the brclient and brserver apps.

It does sound like a memory leak possibly. If so you might have to fire the system call in another session that will die after execution. Had to do that with PDF generation on the MAC because of a memory leak in the PDF library.

Steve
Steve Koger
Computer Specialist
SEKESC-MACS Division
mluchterhand
Posts: 52
Joined: Mon Jun 08, 2009 7:28 pm
Location: Des Moines, IA
Contact:

Re: Misc 4.3 Issues

Post by mluchterhand »

Steve,

Another big thanks for the extra suggestions! There is definitely a pattern to the errors. For example, when running a batch of 50 invoices, invoices 31 and 48 may always cause the BR Assertion error. Each time I get the errors, I have to add code to our invoicing programs to skip these invoices and the rest seem to work fine.

However, the next time I run the program is may be a batch of 30 invoices. This time it may be invoice 3 and 20 that cause the errors. It's seemingly random with each batch but consistently errors on the same invoice for that batch if that makes any sense.

It's difficult for me to run the command repeatedly without bombarding myself or a customer with tons of e-mails but I went ahead and added the 'status mem' to just before and after the troublesome line of code in my function. I also added 'status stack' to see if that might help. Thanks much for that suggestion.

Looking at the Linux task manager (top) no task from BR ever takes up more than 2% CPU and 0.3% Memory. I'll have to monitor this while a user is running an invoice program next time.

Would anyone be willing to share their stack configuration? Or be willing to tell me a way to come up with reasonable numbers? It has been a while since I've updated ours and I am now I'm wondering if that could be my problem. Our new 4.3 server has 8GB of memory and we have about 20 users using BR at any given time.
Thanks - Matt Luchterhand
dmeenen
Posts: 50
Joined: Mon Jun 08, 2009 8:34 pm
Contact:

Re: Misc 4.3 Issues

Post by dmeenen »

Matt,

Here are the Memory specs we use in BR wbconfig.sys

REM - SYSTEM PARAMETERS
FILENAMES LOWER_CASE
STATUSLINE ON
MAXRECALL 300
BASEYEAR 1950
workstack 1240000
FORSTACK 400
FLOWSTACK 1250
rpnstack 3750
break 8 1600
MEMORY

Doug Meenen
bluesfannoz
Posts: 291
Joined: Fri Jun 19, 2009 9:01 am
Location: Lawrence, Kansas
Contact:

Re: Misc 4.3 Issues

Post by bluesfannoz »

Matt
Have you looked at BR clients memory usage in Task Manager on the windows client? In our MAC PDF issue the working memory would continue to grow with each successive generation of a PDF until it would crash.

We do not use Linux so I was not sure what utility to use on the server to also monitor the brserver for the user running the command. You might also consider that the sendemail command could be the culprit. I would make sure you have the latest release of it for the server OS your using.

Another thing you might check is the default OPTIONS settings. Something may have been added or changed that could affect your shell calls. Compare the 4.1 settings to the 4.3.
Steve Koger
Computer Specialist
SEKESC-MACS Division
mluchterhand
Posts: 52
Joined: Mon Jun 08, 2009 7:28 pm
Location: Des Moines, IA
Contact:

Re: Misc 4.3 Issues

Post by mluchterhand »

Doug - thanks for the memory specs. I updated mine to be similar to yours (most notably my workstack was much smaller). Since changing those settings I haven't had a report of a BR Assertion error. A few of our primary users are gone today however so I'm not positive the issue has been resolved. But my fingers are definitely crossed!

Steve - I haven't looked at the task manager on the Windows side. Definitely will monitor that next time someone is sending a large batch of invoices. I am also starting to investigate alternatives for sending out my e-mails. I am hoping to avoid that as most I've seen don't offer near the versatility I've become accustomed to.

Thanks again everyone for all the feedback. Can't tell you how much it means having some options to explore as this is a problem I've been battling for weeks.
Thanks - Matt Luchterhand
John
Posts: 555
Joined: Sun Apr 26, 2009 8:27 am

Re: Misc 4.3 Issues

Post by John »

I had some issues with some specific shell calls - I think it was due to a "REM" in my shell call - I *think* this has been resolved now - but I was able to very quickly work around them by having my programs make a batch file with the commands in it and then calling the batch file. If the command lines work fine when you type them but not when you execute "sy... than try making a batch file and calling it instead.

-john bowman
John Bowman
mluchterhand
Posts: 52
Joined: Mon Jun 08, 2009 7:28 pm
Location: Des Moines, IA
Contact:

Re: Misc 4.3 Issues

Post by mluchterhand »

John,

Prior to increasing the WORKSTACK I had tried writing the call to a Linux shell script and still got the error.

However ever since increasing my WORKSTACK I have not received a BR Assertion error. I have a backup program for sending e-mails in place in case we start seeing the errors again but it seems to have solved my issue.

Thanks everyone for the help in this matter.
Thanks - Matt Luchterhand
Post Reply