Skip to content

Error messages are not shown if motmod is loaded and not started #3948

@hdiethelm

Description

@hdiethelm

In 2.9, the message is:

hm2: loading Mesa HostMot2 driver version 0.15
Unknown parameter `num_pwmgens=1'
./hm2-stepper-eth.hal:38: waitpid failed /home/hannes/linuxcnc-src/bin/rtapi_app hm2_eth
./hm2-stepper-eth.hal:38: /home/hannes/linuxcnc-src/bin/rtapi_app exited without becoming ready
./hm2-stepper-eth.hal:38: insmod for hm2_eth failed, returned -1

In master, the message is:

hm2: loading Mesa HostMot2 driver version 0.15
./hm2-stepper-eth.hal:38: waitpid failed /home/hannes/linuxcnc-src/bin/rtapi_app hm2_eth
./hm2-stepper-eth.hal:38: /home/hannes/linuxcnc-src/bin/rtapi_app exited without becoming ready
./hm2-stepper-eth.hal:38: insmod for hm2_eth failed, returned -1

Note the missing Unknown parameter 'num_pwmgens=1'. This message is not printed any more which probably would have saved me 90% of the time debugging the issue #3946.

The issue is introduced with this commit: 47324a7

In motion.c after init, all messages are routed through emc_message_handler. https://github.com/LinuxCNC/linuxcnc/blob/master/src/emc/motion/motion.c#L415

So in the case loading future modules fails and the error is for example printed in https://github.com/LinuxCNC/linuxcnc/blob/master/src/rtapi/uspace_rtapi_app.cc#L232, this is never shown due to the motion thread never starts.

Options:

  • Only switch the message handler to emc_message_handler when motion is started
  • Revert the commit and accept that there are duplicated messages
  • ...probably more

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions