Menu

#153 (Sparc64/NetBSD) ttsession crash

open
nobody
None
2023-03-02
2023-02-16
connor
No

I compiled CDE 2.5.1 from pkgsrc on NetBSD9.3/sparc64.

After startup, the desktop appears, but there is an error with tooltalk:

*** ERROR(4): Dtwm: PID 1187: Thu Feb 16 22:55:15 2023
"Could not connect to ToolTalk:
TT_ERR_NOMP No ttsession process is running, probably because tt_open() has not been called yet. If this code is returned from tt_open() it means ttsession could not be started, which generally means ToolTalk is not installed on this system.
"[330 bytes]

After that, CDE forces to shutdown and i find a ttession.core has been produced.

Please tell me what info is needed to debug this.

Discussion

  • Roger Brown

    Roger Brown - 2023-02-17

    Do you have /etc/rc.conf with "rpcbind=YES" and is rpcbind running?
    Do you have your hostname in /etc/hosts?

     
  • connor

    connor - 2023-02-17

    /etc/rc.conf has:

    hostname="SunUltra25"
    rpcbind=YES
    rpcbind_flags="-l"
    

    /etc/hosts has:

     ::1 localhost localhost.my.domain SunUltra25
     127.0.0.1 localhost localhost.my.domain SunUltra25
    

    rpcbind is running and ttsession seems to coredump.

     
    • Paolo Vincenzo Olivo

      Try with:

      ::1                     SunUltra25        localhost       localhost.
      127.0.0.1               SunUltra25        localhost       localhost.
      

      So that the loop address is associated with your official hostname and aliased to the localhost, rather than the opposite.

       
      • connor

        connor - 2023-02-24

        I changed /etc/hosts accordingly, but ttsession still keeps core dumping on CDE startup; see attached picture

         
  • connor

    connor - 2023-02-21

    Is this helpful for analysis?

    gdb /usr/pkg/dt/bin/ttsession -c ttsession.core 
    GNU gdb (GDB) 8.3
    Copyright (C) 2019 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    Type "show copying" and "show warranty" for details.
    This GDB was configured as "sparc64--netbsd".
    Type "show configuration" for configuration details.
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>.
    Find the GDB manual and other documentation resources online at:
        <http://www.gnu.org/software/gdb/documentation/>.
    
    For help, type "help".
    Type "apropos word" to search for commands related to "word"...
    Reading symbols from /usr/pkg/dt/bin/ttsession...
    (No debugging symbols found in /usr/pkg/dt/bin/ttsession)
    [New process 1]
    Core was generated by `ttsession'.
    Program terminated with signal SIGBUS, Bus error.
    #0  0x00000000433dd620 in ?? () from /usr/lib/libc.so.12
    (gdb) bt full
    #0  0x00000000433dd620 in ?? () from /usr/lib/libc.so.12
    No symbol table info available.
    #1  0x0000000040301f5c in _rtld_bind () from /usr/libexec/ld.elf_so
    No symbol table info available.
    #2  0x00000000433de800 in xdr_long () from /usr/lib/libc.so.12
    No symbol table info available.
    #3  0x0000000040575690 in xdr_tt_access(__rpc_xdr*, _tt_access*) () from /usr/pkg/dt/lib/libtt.so.2
    No symbol table info available.
    #4  0x000000004057628c in xdr_tt_is_file_in_db_args(__rpc_xdr*, _tt_is_file_in_db_args*) ()
       from /usr/pkg/dt/lib/libtt.so.2
    No symbol table info available.
    #5  0x00000000433eb360 in ?? () from /usr/lib/libc.so.12
    No symbol table info available.
    Backtrace stopped: previous frame identical to this frame (corrupt stack?)
    (gdb) 
    
     
    • Jon Trulson

      Jon Trulson - 2023-02-23

      IIRC a bus error on sparc means an unaligned access... I don't know if anyone has tried CDE on a sparc64, maybe on linux. Sorry - this will require someone with the machine (or one like it) to figure out.

       
  • connor

    connor - 2023-02-23

    Is there something i can do - like a debug build with symbols? Can't find information on it...also configure seems to have no option for a debug build?

     
    • hyousatsu

      hyousatsu - 2023-02-27

      I built from the master branch and ttesssion started normally.
      The SPARC64 machine is emulated by QEMU.

       
      • connor

        connor - 2023-02-28

        I can not reproduce it unfortunately. How did you build and run it - afaik there is no framebuffer for QEMU SPARC64?

        I built it from pkgsrc/wm/cde by replacing the source with git master checkout.
        Then in a running lxde desktop i started "./ttsession" without options.
        This gives the text output and a core dump leading to the above gdb analysis:
        ./ttsession[16309]: Can't contact alleged session (host=127.0.0.1, pid=17368); assuming it crashed...

        I also tried to build the git master checkout outside of pkgsrc, but this fails in a lot of ways - the guide posted here under NetBSD is somehow not applicable fully to a NetBSD9.3 system using pkgsrc. It is incorrect or outdated in many places. If you went that route i would appreciate if you could guide me through the build process.

         
        • hyousatsu

          hyousatsu - 2023-03-01

          Yes, I actually used a VNC to test it in QEMU.
          Just use the real machine if you have a workstation.
          I largely followed this link for building. However I didn't patch any source code. I guess the errors that you met are mainly caused by lacking libraries. Please refer to the above link to install all requirements. Another key is the gmake -- always type "gmake" instead of "make" on the command line.

           
        • Roger Brown

          Roger Brown - 2023-03-02

          I have a set of scripts I maintain to build CDE as formal packages on multiple platforms. It has a section which validates the dependencies for each platform and adds custom configuration. I don't use pkgsrc, I always use precompiled binary packages.

          Main documentation: https://sourceforge.net/p/rhubarb-pi/wiki/pkg-cdesktopenv/

          The NetBSD specific section validates the dependencies and also sets up a configuration parameter for tcl

          https://sourceforge.net/p/rhubarb-pi/code/HEAD/tree/trunk/pkg/cdesktopenv/os/NetBSD.cf

          Eg

          for d in ast-ksh freetype2 font-adobe-75dpi font-adobe-100dpi fontconfig motif tcl gmake autoconf automake pam-pwauth_suid libtool bison
          do
              if pkg_info "$d" > /dev/null
              then
                  :
              else
                  MISSINGPKG="$MISSINGPKG $d"
              fi
          done
          

          and

          for d in $(find /usr/pkg/lib -name tclConfig.sh)
          do
              if test -f "$d"
              then
                  CONFIGURATION_PARAMS="$CONFIGURATION_PARAMS --with-tcl=$(dirname $d)"
              fi
          done
          

          This common script builds 2.5.1 on NetBSD 9.3 on x86_64, i386, aarch64 and earmv7hf

           
  • Roger Brown

    Roger Brown - 2023-03-02

    The main processor specific portability problems I have had are often with the KSH implementation, typically the handling of va_args. If 2.5.1 does not work then you could try going back to the IMAKE based 2.4.0 release.

     
    • Jon Trulson

      Jon Trulson - 2023-03-02

      This appears to be a problem specifically with tooltalk/RPC...

       
  • Roger Brown

    Roger Brown - 2023-03-02

    I have used QEMU to build a riscv64 version, for that I used an Xserver on the actual host system. That took over three days to compile 2.4.0.

     

Log in to post a comment.

MongoDB Logo MongoDB