[Bug 2035561] Re: [SRU]crash when installing tp-smapi

Khairul Aizat Kamarudzzaman 2035561 at bugs.launchpad.net
Thu Nov 23 13:41:18 UTC 2023


fenris at ThinkPad-P1 ~> sudo apt install tp-smapi-dkms
[sudo] password for fenris: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  tp-smapi-dkms
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 32.3 kB of archives.
After this operation, 121 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu mantic/universe amd64 tp-smapi-dkms amd64 0.44-1ubuntu1 [32.3 kB]
Fetched 32.3 kB in 8s (4,118 B/s)        
Selecting previously unselected package tp-smapi-dkms.
(Reading database ... 391838 files and directories currently installed.)
Preparing to unpack .../tp-smapi-dkms_0.44-1ubuntu1_amd64.deb ...
Unpacking tp-smapi-dkms (0.44-1ubuntu1) ...
Setting up tp-smapi-dkms (0.44-1ubuntu1) ...
fenris at ThinkPad-P1 ~>

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/2035561

Title:
  [SRU]crash when installing tp-smapi

Status in OEM Priority Project:
  Triaged
Status in tp-smapi package in Ubuntu:
  New

Bug description:
  [Impact]
  tp-smapi-dkms is a kernel module exposes some features of the ThinkPad
  hardware/firmware via a sysfs interface. It will crash after 6.4 kernel.
  In OEM projects, we met this issue on 6.5.0-oem kernel. And it blocks our
  QA team to install hdapsd, because it's in "Recommends: tp-smapi-dkms".

  [Test case]
  On 22.04, just run below command.
  $ sudo apt install tp-smapi-dkms

  Loading new tp_smapi-0.43 DKMS files...
  Building for 6.5.0-1008-oem
  Building initial module for 6.5.0-1008-oem
  ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/tp-smapi-dkms.0.crash'
  Error! Bad return status for module build on kernel: 6.5.0-1008-oem (x86_64)
  Consult /var/lib/dkms/tp_smapi/0.43/build/make.log for more information.
  dpkg: error processing package tp-smapi-dkms (--configure):
   installed tp-smapi-dkms package post-installation script subprocess returned error exit status 10
  Errors were encountered while processing:
   tp-smapi-dkms
  E: Sub-process /usr/bin/dpkg returned an error code (1)

  [Potential regression]
  It's low risk, cherry-pick from uptream, it uses KERNEL_VERSION MACRO to support 6.4+ kernel.
  Linux changed the DEFINE_SEMAPHORE macro in                                                                                             
  48380368dec14859723b9e3fbd43e042638d9a76, making it take two parameters                                                                 
  instead of one. Pass an explicit 1 as on 6.4+.

   /* Locking: */                                                                                                                         
   #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)                                                                                        
   static DECLARE_MUTEX(thinkpad_ec_mutex);                                                                                               
  -#else                                                                                                                                  
  +#elif LINUX_VERSION_CODE < KERNEL_VERSION(6,4,0)                                                                                       
   static DEFINE_SEMAPHORE(thinkpad_ec_mutex);                                                                                            
  +#else                                                                                                                                  
  +static DEFINE_SEMAPHORE(thinkpad_ec_mutex, 1);                                                                                         
   #endif

To manage notifications about this bug go to:
https://bugs.launchpad.net/oem-priority/+bug/2035561/+subscriptions





More information about the Ubuntu-sponsors mailing list