NetBSD v7.0 Released

NetBSD Project has just released NetBSD v7.0.
http://blog.netbsd.org/tnf/entry/announcing_netbsd_7_0

NetBSD is a free, fast, secure, and highly portable Unix-like Open Source operating system. It is available for a wide range of platforms, from large-scale servers and powerful desktop systems to handheld and embedded devices.

Regards,
Roger Lacroix
Capitalware Inc.

Open Source, Operating Systems Comments Off on NetBSD v7.0 Released

Perl 6 Released

The Perl developers have just released Perl 6.
http://perl6.org

Perl is a high-level programming language with an eclectic heritage written by Larry Wall and a cast of thousands. It derives from the ubiquitous C programming language and to a lesser extent from sed, awk, the Unix shell, and at least a dozen other tools and languages.

Regards,
Roger Lacroix
Capitalware Inc.

Linux, macOS (Mac OS X), Open Source, Perl, Programming, Unix, Windows Comments Off on Perl 6 Released

Head, Apply Wall To It Several Times!

If you don’t like that title, how about “How to out smart yourself and shoot yourself in the foot, all at the same time!” or “No smart deed goes unpunished!”.

In the summer of 2014, I decided to clean up up some compiler warning messages that certain compilers (HP-UX cc comes to mind) were complaining about. Note: The idea was a good one, it is the extra “smart” stuff I did that came back to bit me in the ass.

The compiler was complaining about assigning “size_t” to an “int” for the strlen() function. I was doing:

int   len = strlen( pStr );

So, I made an executive decision (I am the CTO) to change any and all variables that were used for strlen() in 14 commercial products, 6 ‘licensed as free’ products and 9 ‘open source’ projects to use “size_t” rather than “int”. Simple idea and nothing bad could come of it, right.

So, along the way, I decided that some for-loop counters could also be “size_t” rather than “int”. So, subroutine RemoveTrailingBlanks (along with a lot of other code) change from:

void RemoveTrailingBlanks( char *pStr )
{
   int      i;
   int      len = strlen( pStr );

   if (len <= 0)
      return;

   for ( i = (len - 1 ); i >= 0 ; i-- )
   {
      if ( *(pStr + i) != ' ' )     /* non-blank? */
      {
         break;
      }
   }

   /* Set trailing blanks to nulls. */
   memset( pStr + i + 1, '\0', (len - i) );
}

To:

void RemoveTrailingBlanks( char *pStr )
{
   size_t      i;
   size_t      len = strlen( pStr );

   if (len <= 0)
      return;

   for ( i = (len - 1 ); i >= 0 ; i-- )
   {
      if ( *(pStr + i) != ' ' )     /* non-blank? */
      {
         break;
      }
   }

   /* Set trailing blanks to nulls. */
   memset( pStr + i + 1, '\0', (len - i) );
}

After I updated many programs and subroutines, I thoroughly tested everything out and everything worked.

Now, if you can tell how I shot myself in the foot without reading further then you get a gold star because I missed it and even after I knew there was an issue, it took me more than 30 minutes to figure it out.

So, the other day a customer emailed me saying that they did an upgrade of MQAUSX on IBM i (OS/400) and the channel crashed. They sent me the IBM i joblog and the MQAUSX logfile. Here’s a snippet of the joblog:

From module . . . :   MQAUSXO
From procedure  . :   RemoveTrailingBlanks
Statement . . . . :   5
To module . . . . :   MQAUSXO
To procedure  . . :   RemoveTrailingBlanks
Statement . . . . :   5
Thread  . . . . . :   00000141
Message   . . . . :   Pointer not set for location referenced.
Cause   . . . . . :   A pointer was used, either directly or as a basing pointer, that has not been set to an address.

I looked at it and said WTF!?! RemoveTrailingBlanks is a world’s simplest routine that I wrote something like 15 years ago. So, I opened the code in Eclipse and stared at RemoveTrailingBlanks and nothing jumped out at me. After a few minutes, I remembered my “size_t” task I did 16 months ago but still nothing jumped out.

The IBM i joblog says it is line # 5 which is the “if” statement. For those of you counting lines and saying I don’t know how to count, the first line of “size_t i” is a declaration and not a statement. I’m staring at the “if” statement thinking how could it work for 15 years and suddenly not work anymore. Then I thought, what did I change back in June 2014? I looked in my source code repository and reviewed what changed. If you look above you can see that I only changed the first 2 lines of RemoveTrailingBlanks subroutine. I changed both lines to declare the variables as “size_t” rather than “int”. Again, I stared at it thinking there is nothing wrong with the code.

And then it hit me like a freight train, “size_t” is just a “typedef” for “unsigned int”. So, do you get it yet?

No, let me explain more. An “unsigned int” variable means that it will contain whole positive numbers. So, do you get it yet?

No, let me explain more. Look carefully at the for-loop. What is the code testing for? A number great than or equal to zero (“i >= 0”). So, do you get it yet?

No, let me explain more. Look at the last part of for-loop, the code is decrementing the counter (“i–“). So, do you get it yet?

No, let me explain more. What happens when “i” is zero and it is decremented by 1? Remember, “i” was declared as “size_t” and not “int”. The next number after 0 is 4294967296 and not -1. Remember, we are dealing with whole positive numbers. Therefore, “i” will never be negative, hence, the for-loop will go off into la la land until it finds a non-blank character.

So, why didn’t this show up in my testing, well luckily or unluckily, it is a rare case where the entire string that is passed into RemoveTrailingBlanks is all blanks which happened to be what happened with this customer. 99.99% of the time, the incoming string will have at least 1 non-blank character.

Now back to the regularly scheduled banging of my head against the wall.

Regards,
Roger Lacroix
Capitalware Inc.

C, Capitalware, IBM i (OS/400), IBM MQ, Licensed As Free, Linux, macOS (Mac OS X), Open Source, Programming, Unix, Windows, z/OS Comments Off on Head, Apply Wall To It Several Times!

Summary of MQ Technical Conference v2.0.1.5

I would like to thank the attendees, speakers and sponsors for participating in the 3rd annual MQ Technical Conference.

I hope the attendees learned a few new things and were well fed in the process. 🙂

Next year’s conference, MQTC v2.0.1.6 will be held on September 26 to 28th, 2016 at Kalahari Resorts.

Regards,
Roger Lacroix
Capitalware Inc.

Capitalware, Education, IBM MQ, MQ Technical Conference Comments Off on Summary of MQ Technical Conference v2.0.1.5

Presentations for MQ Technical Conference v2.0.1.5

I have updated the Sessions web page to include links to each session’s presentation (in PDF format). As I get the final few presentations, I’ll update the Sessions web page.

Regards,
Roger Lacroix
Capitalware Inc.

Capitalware, Education, IBM MQ, MQ Technical Conference Comments Off on Presentations for MQ Technical Conference v2.0.1.5

Third Day of MQ Technical Conference v2.0.1.5

Omelet bar at Breakfast:

Lyn Elkins presenting the ‘MQ for z/OS – The V8 SMF data’ session:

Lunch:

IBM Give Away & Closing Remarks:

Afternoon desserts:

Dave Ware presenting the ‘What can you achieve with MQ clusters?’ session:

Regards,
Roger Lacroix
Capitalware Inc.

Education, IBM MQ, MQ Technical Conference Comments Off on Third Day of MQ Technical Conference v2.0.1.5

Second Day of MQ Technical Conference v2.0.1.5

Breakfast:

Lunch:

Chris Frank presenting ‘Mysteries of the Distributed MQ Logger’ session:

Afternoon desserts – cheesecake:

Bats of a Feather session – sorry I didn’t get a picture of the winners:

Regards,
Roger Lacroix
Capitalware Inc.

Education, IBM MQ, MQ Technical Conference Comments Off on Second Day of MQ Technical Conference v2.0.1.5

First Day of MQ Technical Conference v2.0.1.5

Breakfast:

Mark Taylor presenting ‘What’s New in IBM messaging’ session:

Glen Brumbaugh presenting ‘SSL/TLS: Using and Managing Certificates’ session:

Lunch:

Lyn Elkins presenting ‘MQ for z/OS – Taking advantage of the platform’ session:

Afternoon desserts – ice cream social:

What’s that you ask? Well, its an IBM MQ Appliance:

Monday evening in the Vendor Pavilion:



Regards,
Roger Lacroix
Capitalware Inc.

Education, IBM MQ, MQ Technical Conference Comments Off on First Day of MQ Technical Conference v2.0.1.5

Sunday at MQ Technical Conference v2.0.1.5

This year’s attendance is up by 15%-16% over last year’s conference. 🙂

Registration & Welcome Social for MQTC v2.0.1.5:

Regards,
Roger Lacroix
Capitalware Inc.

Education, IBM MQ, MQ Technical Conference Comments Off on Sunday at MQ Technical Conference v2.0.1.5

Mozilla Firefox 41.0 Released

Mozilla Firefox has just released Mozilla Firefox v41.0.
http://www.mozilla.com/firefox/

Mozilla Firefox is a free and open source web browser descended from the Mozilla Application Suite and managed by Mozilla Corporation. To display web pages, Firefox uses the Gecko layout engine, which implements most current web standards in addition to several features that are intended to anticipate likely additions to the standards

Regards,
Roger Lacroix
Capitalware Inc.

Linux, macOS (Mac OS X), Open Source, Windows Comments Off on Mozilla Firefox 41.0 Released