Skip to main content
Apr 7, 2017 4:04 PM UTC

Bash gets S0C4 when executing a 'set' command when .bashrc is present

I’m getting a S0C4 when I invoke the ‘set’ command after invoking ‘bash’ with a .bashrc file present. The .bashrc file creates 4 aliases and sets and exports the PS1 environment variable.

If I remove the file, the S0C4 does not occur.
If I comment out (#) all the lines in .bashrc, the S0C4 does not occur.
If I uncomment any one line, doesn’t seem to matter which, the S0C4 occurs.

If I rename the .bashrc file to .bashrcx then invoke bash and enter ‘. ./.bashrcx’, all of the aliases and the PS1 variable get set. Then when I issue the ‘set’ command, I do not get a S0C4.

There clearly seems to be an issue with using a .bashrc file at the invocation of bash.

The .bashrc file is encoded IBM-1047. I’m trying to create an ISO-8859-1 version of the file to see if the issue still exists.

Any thoughts appreciated.

    22 replies

    Tatiana Balaburkina
    Rocketeer
    Apr 10, 2017 4:52 AM UTC

    I’m getting a S0C4 when I invoke the ‘set’ command after invoking ‘bash’ with a .bashrc file present. The .bashrc file creates 4 aliases and sets and exports the PS1 environment variable.

    If I remove the file, the S0C4 does not occur.
    If I comment out (#) all the lines in .bashrc, the S0C4 does not occur.
    If I uncomment any one line, doesn’t seem to matter which, the S0C4 occurs.

    If I rename the .bashrc file to .bashrcx then invoke bash and enter ‘. ./.bashrcx’, all of the aliases and the PS1 variable get set. Then when I issue the ‘set’ command, I do not get a S0C4.

    There clearly seems to be an issue with using a .bashrc file at the invocation of bash.

    The .bashrc file is encoded IBM-1047. I’m trying to create an ISO-8859-1 version of the file to see if the issue still exists.

    Any thoughts appreciated.

    Hi,

    Which bash version do you use? (bash --version)

    Apr 10, 2017 10:21 AM UTC

    I’m getting a S0C4 when I invoke the ‘set’ command after invoking ‘bash’ with a .bashrc file present. The .bashrc file creates 4 aliases and sets and exports the PS1 environment variable.

    If I remove the file, the S0C4 does not occur.
    If I comment out (#) all the lines in .bashrc, the S0C4 does not occur.
    If I uncomment any one line, doesn’t seem to matter which, the S0C4 occurs.

    If I rename the .bashrc file to .bashrcx then invoke bash and enter ‘. ./.bashrcx’, all of the aliases and the PS1 variable get set. Then when I issue the ‘set’ command, I do not get a S0C4.

    There clearly seems to be an issue with using a .bashrc file at the invocation of bash.

    The .bashrc file is encoded IBM-1047. I’m trying to create an ISO-8859-1 version of the file to see if the issue still exists.

    Any thoughts appreciated.

    Should be the latest greatest

    /V2R1/usr/lpp/ported/rocket/bash/bin []$ bash --version
    GNU bash, version 4.3.46(6)-release (i370-ibm-openedition)

    Here’s the message that comes out when I get the S0C4:

    $ set
    CEE3204S The system detected a protection exception (System Completion Code=0C4).
    From entry point print_assignment at compile unit offset +000000E6 at entry offset +000000E6 at address
    2483BF26.
    Segmentation fault

    And here is the traceback in the dump:

    CEE3DMP V2 R1.0: Condition processing resulted in the unhandled condition.         04/10/17 10:15:20 AM                 Page:    1
    ASID: 0168   PID: 33686759   Parent PID: 33686744   User name: DEVCGC
    
    CEE3845I CEEDUMP Processing started.
    
    Information for enclave main
    
      Information for thread 24F9620000000001
    
      Traceback:
        DSA   Entry       E  Offset  Statement   Load Mod             Program Unit                   Service  Status
        1     CEEHDSP     +00004A4C              CEEPLPKA             CEEHDSP                        UI90017  Call
        2     CEEHRNUH    +0000009A              CEEPLPKA             CEEHRNUH                       HLE7790  Call
        3     __printf_a  +0000303A              CELHV003                                            UI14148  Exception
        4     print_assignment
                          +000000E6              bash                                                         Call
        5     print_var_list
                          +0000002E              bash                                                         Call
        6     print_all_shell_variables
                          +0000002A              bash                                                         Call
        7     set_builtin +00000012              bash                                                         Call
        8     execute_builtin
                          +000003DE              bash                                                         Call
        9     execute_builtin_or_function
                          +0000015C              bash                                                         Call
        10    execute_simple_command
                          +00000A9A              bash                                                         Call
        11    execute_command_internal
                          +000008BC              bash                                                         Call
        12    execute_command
                          +00000092              bash                                                         Call
        13    reader_loop +0000029C              bash                                                         Call
        14    main        +00000C0A              bash                                                         Call
        15    CEEVROND    +00001258              CEEPLPKA                                                     Call
        16    EDCZHINV    +000000B4              CELHV003             EDCZHINV                       HLE7790  Call
        17    CEEBBEXT    +000001D2              CEEPLPKA             CEEBBEXT                       HLE7790  Call
    Apr 11, 2017 2:57 PM UTC

    Hi,

    Which bash version do you use? (bash --version)

    For some reason my answer to this post was blocked. I’m waiting for them to release it. It has a lot of information about the issue that I don’t want to have to repeat.

    Apr 11, 2017 3:00 PM UTC

    For some reason my answer to this post was blocked. I’m waiting for them to release it. It has a lot of information about the issue that I don’t want to have to repeat.

    GNU bash, version 4.3.46(6)-release (i370-ibm-openedition)

    I had the traceback in my other post that got blocked. I’ll try posting things separately until I figure out why it was blocked.

    Apr 11, 2017 3:03 PM UTC

    GNU bash, version 4.3.46(6)-release (i370-ibm-openedition)

    I had the traceback in my other post that got blocked. I’ll try posting things separately until I figure out why it was blocked.

    Here is the actual abend.

    $ set
    CEE3204S The system detected a protection exception (System Completion Code=0C4).
    From entry point print_assignment at compile unit offset +000000E6 at entry offset +000000E6 at address
    2483BF26.
    [1] + Done(139) ?
    50463745 Segmentation violation /V2R1/usr/lpp/ported/rocket/bash/bin/bash

    Apr 15, 2017 11:37 AM UTC

    I’m getting a S0C4 when I invoke the ‘set’ command after invoking ‘bash’ with a .bashrc file present. The .bashrc file creates 4 aliases and sets and exports the PS1 environment variable.

    If I remove the file, the S0C4 does not occur.
    If I comment out (#) all the lines in .bashrc, the S0C4 does not occur.
    If I uncomment any one line, doesn’t seem to matter which, the S0C4 occurs.

    If I rename the .bashrc file to .bashrcx then invoke bash and enter ‘. ./.bashrcx’, all of the aliases and the PS1 variable get set. Then when I issue the ‘set’ command, I do not get a S0C4.

    There clearly seems to be an issue with using a .bashrc file at the invocation of bash.

    The .bashrc file is encoded IBM-1047. I’m trying to create an ISO-8859-1 version of the file to see if the issue still exists.

    Any thoughts appreciated.

    Does Rocket Software monitor this forum? I’m hoping to get some feedback on this issue. It would be real nice to be able to let my .bashrc script run at bash startup.

    Tatiana Balaburkina
    Rocketeer
    Apr 18, 2017 1:11 AM UTC

    I’m getting a S0C4 when I invoke the ‘set’ command after invoking ‘bash’ with a .bashrc file present. The .bashrc file creates 4 aliases and sets and exports the PS1 environment variable.

    If I remove the file, the S0C4 does not occur.
    If I comment out (#) all the lines in .bashrc, the S0C4 does not occur.
    If I uncomment any one line, doesn’t seem to matter which, the S0C4 occurs.

    If I rename the .bashrc file to .bashrcx then invoke bash and enter ‘. ./.bashrcx’, all of the aliases and the PS1 variable get set. Then when I issue the ‘set’ command, I do not get a S0C4.

    There clearly seems to be an issue with using a .bashrc file at the invocation of bash.

    The .bashrc file is encoded IBM-1047. I’m trying to create an ISO-8859-1 version of the file to see if the issue still exists.

    Any thoughts appreciated.

    Hi,

    Do you start bash manually? How (when and where) do you set these variables:
    export _CEE_RUNOPTS="FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)"
    export _BPXK_AUTOCVT=ON
    export _TAG_REDIR_ERR=txt
    export _TAG_REDIR_IN=txt
    export _TAG_REDIR_OUT=txt

    Apr 18, 2017 9:29 AM UTC

    I’m getting a S0C4 when I invoke the ‘set’ command after invoking ‘bash’ with a .bashrc file present. The .bashrc file creates 4 aliases and sets and exports the PS1 environment variable.

    If I remove the file, the S0C4 does not occur.
    If I comment out (#) all the lines in .bashrc, the S0C4 does not occur.
    If I uncomment any one line, doesn’t seem to matter which, the S0C4 occurs.

    If I rename the .bashrc file to .bashrcx then invoke bash and enter ‘. ./.bashrcx’, all of the aliases and the PS1 variable get set. Then when I issue the ‘set’ command, I do not get a S0C4.

    There clearly seems to be an issue with using a .bashrc file at the invocation of bash.

    The .bashrc file is encoded IBM-1047. I’m trying to create an ISO-8859-1 version of the file to see if the issue still exists.

    Any thoughts appreciated.

    We start bash at the end of our .profile script. I could not get it to display its startup messages correctly when set as my default shell.

    The exports for the required environment variables are done in /etc/profile.

    #Begin Rocket Software
    #Ported Tools for z/OS
    #PERL
    export LIBPATH=$LIBPATH:/V2R1/usr/lpp/ported/rocket/perl/lib/perl5/5.24.0/os390/CORE
    export PATH=$PATH:/V2R1/usr/lpp/ported/rocket/perl/bin
    export MANPATH=$MANPATH:/V2R1/usr/lpp/ported/rocket/perl/share/man
    export PERL5LIB=$PERL5LIB:/V2R1/usr/lpp/ported/rocket/perl/lib/perl5
    #GIT
    export GIT_SHELL=/usr/lpp/ported/rocket/bash/bin
    export GIT_EXEC_PATH=/usr/lpp/ported/rocket/git/libexec/git-core
    export GIT_TEMPLATE_DIR=/usr/lpp/ported/rocket/share/git-core/templates
    export PATH=$PATH:/V2R1/usr/lpp/ported/rocket/git/bin
    export MANPATH=$MANPATH:/V2R1/usr/lpp/ported/rocket/git/man
    #MAKE
    ##We want rocket make ahead of IBM's make command
    export PATH=/V2R1/usr/lpp/ported/rocket/make/bin:$PATH
    #export MANPATH=$MANPATH:/V2R1/usr/lpp/ported/rocket/make/share/man
    export MANPATH=/V2R1/usr/lpp/ported/rocket/make/share/man:$MANPATH
    #BASH
    export PATH=$PATH:/V2R1/usr/lpp/ported/rocket/bash/bin
    export MANPATH=$MANPATH:/V2R1/usr/lpp/ported/rocket/bash/man
    #GZIP
    export PATH=$PATH:/V2R1/usr/lpp/ported/rocket/gzip/bin
    export MANPATH=$MANPATH:/V2R1/usr/lpp/ported/rocket/gzip/man
    #UNZIP
    export PATH=$PATH:/V2R1/usr/lpp/ported/rocket/unzip/bin
    export MANPATH=$MANPATH:/V2R1/usr/lpp/ported/rocket/unzip/man
    #AUTOMAKE
    export PATH=$PATH:/V2R1/usr/lpp/ported/rocket/automake/bin
    export INFOPATH=$INFOPATH:/V2R1/usr/lpp/ported/rocket/automake/share/info
    #ASCII environment variables
     export _BPXK_AUTOCVT=ON
     export _CEE_RUNOPTS="FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)"
     export _TAG_REDIR_ERR=txt
     export _TAG_REDIR_IN=txt
     export _TAG_REDIR_OUT=txt
    #End Rocket Software
    Apr 18, 2017 9:42 AM UTC

    I’m getting a S0C4 when I invoke the ‘set’ command after invoking ‘bash’ with a .bashrc file present. The .bashrc file creates 4 aliases and sets and exports the PS1 environment variable.

    If I remove the file, the S0C4 does not occur.
    If I comment out (#) all the lines in .bashrc, the S0C4 does not occur.
    If I uncomment any one line, doesn’t seem to matter which, the S0C4 occurs.

    If I rename the .bashrc file to .bashrcx then invoke bash and enter ‘. ./.bashrcx’, all of the aliases and the PS1 variable get set. Then when I issue the ‘set’ command, I do not get a S0C4.

    There clearly seems to be an issue with using a .bashrc file at the invocation of bash.

    The .bashrc file is encoded IBM-1047. I’m trying to create an ISO-8859-1 version of the file to see if the issue still exists.

    Any thoughts appreciated.

    We did come across what may be a clue to isolating the issue. If my developer enters alias followed by the set command, he gets the S0C4 without executing .bashrc. These abends are pretty consistent so I’m hoping someone from Rocket will attempt to recreate this.

    []$ alias
    []$ set
    CEE3204S The system detected a protection exception (System Completion Code=0C4).
             From entry point print_assignment at compile unit offset +000000E6 at entry offset +000000E6 at address
             2483BF26.
    [1] + Done(139) ?
      16908440      Segmentation violation  /V2R1/usr/lpp/ported/rocket/bash/bin/bash
    Tatiana Balaburkina
    Rocketeer
    Apr 19, 2017 6:35 AM UTC

    I’m getting a S0C4 when I invoke the ‘set’ command after invoking ‘bash’ with a .bashrc file present. The .bashrc file creates 4 aliases and sets and exports the PS1 environment variable.

    If I remove the file, the S0C4 does not occur.
    If I comment out (#) all the lines in .bashrc, the S0C4 does not occur.
    If I uncomment any one line, doesn’t seem to matter which, the S0C4 occurs.

    If I rename the .bashrc file to .bashrcx then invoke bash and enter ‘. ./.bashrcx’, all of the aliases and the PS1 variable get set. Then when I issue the ‘set’ command, I do not get a S0C4.

    There clearly seems to be an issue with using a .bashrc file at the invocation of bash.

    The .bashrc file is encoded IBM-1047. I’m trying to create an ISO-8859-1 version of the file to see if the issue still exists.

    Any thoughts appreciated.

    Hi,
    I’m a Rocket engineer.
    I’ve reproduced the case. And I didn’t get this exception. Also I have never got this error.
    We’re going to update bash-4.3 soon (couple of weeks). Could you wait for update, please?