From lukele at gpgtools.org Wed Apr 2 09:40:15 2025 From: lukele at gpgtools.org (Lukas | GPGTools) Date: Wed, 2 Apr 2025 09:40:15 +0200 Subject: Dirmngr - high cpu usage - 100% Message-ID: <30E005FC-1DBC-4976-909F-948938389645@gpgtools.org> Hi all, dirmngr of a self-compiled version of gnupg 2.4.7 on macOS 15.4 shows a constantly cpu usage of 99-100%. From the spindump (attached) it appears that the problem is somehow related to DNS `dns_res_check` for example. The same behavior could not be observed with gnupg 2.2.x. What is the best way to debug what is going wrong? Thanks for any pointers! Cheers, Lukas -------------- next part -------------- Date/Time: 2025-04-02 09:35:43.938 +0200 End time: 2025-04-02 09:35:53.942 +0200 OS Version: macOS 15.4 (Build 24E248) Architecture: arm64e Report Version: 60 Data Source: Stackshots Shared Cache: 32A9F5FD-14A8-3423-8952-1464A6903997 slid base address 0x186bc0000, slide 0x6bc0000 (System Primary) Shared Cache: DE511D4B-CBA4-3715-8ED6-0B3E28BB6DA2 slid base address 0x19fe44000, slide 0x1fe44000 (DriverKit) Shared Cache: B64757D8-5205-3150-BA5D-BD1173320EAE slid base address 0x7ff802d6c000, slide 0x2d6c000 (Rosetta) Command: dirmngr Path: /usr/local/MacGPG2/bin/dirmngr Codesigning ID: dirmngr Team ID: PKV8ZPD836 Architecture: arm64 Parent: launchd [1] Responsible: Tower [905] PID: 9541 Time Since Fork: 39828s Duration: 10.00s Steps: 1001 (10ms sampling interval) Hardware model: MacBookPro18,3 Active cpus: 10 HW page size: 16384 VM page size: 16384 Shared cache residency: 34.52% (1611.83 MB / 4668.64 MB) Boot args: -arm64e_preview_abi Time Since Boot: 57509s Time Awake Since Boot: 30491s Time Since Wake: 4448s Fan speed: 2327 rpm Total CPU Time: 36.172s (90.7G cycles, 217.2G instructions, 0.42c/i) Advisory levels: Battery -> 3, User -> 2, ThermalPressure -> 0, Combined -> 2 Free disk space: 437.78 GB/1858.19 GB, low space threshold 3072 MB Vnodes Available: 71.62% (188481/263168) Model: com.apple.fm.language.instruct_3b.tokenizer Loaded: ??? - N/A, requested by UNKNOWN Preferred User Language: en-AT, de-AT Country Code: AT OS Cryptex File Extents: 1080 ---------------------------------------- Heavy format: stacks are sorted by count ---------------------------------------- Process: dirmngr [9541] UUID: 95FFA4DD-B5F1-3736-878E-39B3B7B2D60B Path: /usr/local/MacGPG2/bin/dirmngr Codesigning ID: dirmngr Team ID: PKV8ZPD836 Shared Cache: 32A9F5FD-14A8-3423-8952-1464A6903997 slid base address 0x186bc0000, slide 0x6bc0000 (System Primary) Architecture: arm64 Parent: launchd [1] Responsible: Tower [905] UID: 501 Footprint: 8961 KB Time Since Fork: 39828s Num samples: 1001 (1-1001) CPU Time: 9.980s (31.2G cycles, 105.2G instructions, 0.30c/i) Num threads: 3 Thread 0x36117 1001 samples (1-1001) priority 31 (base 31) 1001 start + 6000 (dyld + 27468) [0x186c92b4c] 1001 main + 2668 (dirmngr + 8600) [0x102326198] 1001 handle_connections + 504 (dirmngr + 15364) [0x102327c04] 1001 npth_pselect + 120 (libnpth.0.dylib + 14004) [0x1023ff6b4] 1001 _dispatch_semaphore_wait_slow + 132 (libdispatch.dylib + 16144) [0x186e7bf10] 1001 semaphore_wait_trap + 8 (libsystem_kernel.dylib + 2992) [0x186fefbb0] *1001 ??? (kernel.release.t6000 + 693952) [0xfffffe00088456c0] Thread 0x36118 1001 samples (1-1001) priority 31-46 (base 31) cpu time 9.980s (31.2G cycles, 105.2G instructions, 0.30c/i) 1001 thread_start + 8 (libsystem_pthread.dylib + 7040) [0x18702cb80] 1001 _pthread_start + 136 (libsystem_pthread.dylib + 27660) [0x187031c0c] 1001 thread_start + 76 (libnpth.0.dylib + 11376) [0x1023fec70] 1001 start_connection_thread + 232 (dirmngr + 19540) [0x102328c54] 1001 start_command_handler + 544 (dirmngr + 22004) [0x1023295f4] 1001 assuan_process + 160 (libassuan.9.dylib + 31692) [0x102417bcc] 1001 dispatch_command + 600 (libassuan.9.dylib + 35592) [0x102418b08] 1001 cmd_ks_get + 780 (dirmngr + 35824) [0x10232cbf0] 1001 ks_action_get + 488 (dirmngr + 154756) [0x102349c84] 1001 ks_hkp_get + 456 (dirmngr + 164688) [0x10234c350] 1001 make_host_part + 484 (dirmngr + 158840) [0x10234ac78] 1001 get_dns_srv + 212 (dirmngr + 122076) [0x102341cdc] 1001 getsrv_libdns + 256 (dirmngr + 123744) [0x102342360] 1001 libdns_res_wait + 144 (dirmngr + 113492) [0x10233fb54] 1001 dns_res_check + 5768 (dirmngr + 258460) [0x10236319c] 982 __connect + 8 (libsystem_kernel.dylib + 20736) [0x186ff4100] *981 ??? (kernel.release.t6000 + 31584) [0xfffffe00087a3b60] *981 ??? (kernel.release.t6000 + 31640) [0xfffffe00087a3b98] *960 ??? (kernel.release.t6000 + 1829088) [0xfffffe000895a8e0] *956 ??? (kernel.release.t6000 + 7362064) [0xfffffe0008ea1610] *900 ??? (kernel.release.t6000 + 6536172) [0xfffffe0008dd7bec] *895 ??? (kernel.release.t6000 + 6466912) [0xfffffe0008dc6d60] *895 ??? (kernel.release.t6000 + 4400384) [0xfffffe0008bce500] *672 ??? (kernel.release.t6000 + 3650176) [0xfffffe0008b17280] *238 ??? (kernel.release.t6000 + 3633016) [0xfffffe0008b12f78] (running) *143 ??? (kernel.release.t6000 + 3632828) [0xfffffe0008b12ebc] (running) *115 ??? (kernel.release.t6000 + 3632720) [0xfffffe0008b12e50] (running) *77 ??? (kernel.release.t6000 + 3633016) [0xfffffe0008b12f78] *66 ??? (kernel.release.t6000 + 3647728) [0xfffffe0008b168f0] *59 ??? (kernel.release.t6000 + 3297092) [0xfffffe0008ac0f44] *21 ??? (kernel.release.t6000 + 3299152) [0xfffffe0008ac1750] *17 ??? (kernel.release.t6000 + 3323264) [0xfffffe0008ac7580] *16 ??? (kernel.release.t6000 + 3284240) [0xfffffe0008abdd10] *16 ??? (kernel.release.t6000 + 3284240) [0xfffffe0008abdd10] (running) *1 ??? (kernel.release.t6000 + 3284240) [0xfffffe0008abdd10] (running) *2 ??? (kernel.release.t6000 + 3299152) [0xfffffe0008ac1750] (running) *1 ??? (kernel.release.t6000 + 3322992) [0xfffffe0008ac7470] *1 ??? (kernel.release.t6000 + 3322992) [0xfffffe0008ac7470] (running) *1 ??? (kernel.release.t6000 + 3322992) [0xfffffe0008ac7470] (running) *13 ??? (kernel.release.t6000 + 3299788) [0xfffffe0008ac19cc] (running) *11 ??? (kernel.release.t6000 + 3301504) [0xfffffe0008ac2080] *11 ??? (kernel.release.t6000 + 3301504) [0xfffffe0008ac2080] (running) *8 ??? (kernel.release.t6000 + 3299788) [0xfffffe0008ac19cc] *5 ??? (kernel.release.t6000 + 3323264) [0xfffffe0008ac7580] *3 ??? (kernel.release.t6000 + 3284240) [0xfffffe0008abdd10] *3 ??? (kernel.release.t6000 + 3284240) [0xfffffe0008abdd10] (running) *1 ??? (kernel.release.t6000 + 3323264) [0xfffffe0008ac7580] (running) *1 ??? (kernel.release.t6000 + 3284240) [0xfffffe0008abdd10] (running) *2 ??? (kernel.release.t6000 + 3323264) [0xfffffe0008ac7580] (running) *1 ??? (kernel.release.t6000 + 3322992) [0xfffffe0008ac7470] (running) *2 ??? (kernel.release.t6000 + 3298548) [0xfffffe0008ac14f4] *2 ??? (kernel.release.t6000 + 3298548) [0xfffffe0008ac14f4] (running) *1 ??? (kernel.release.t6000 + 3301504) [0xfffffe0008ac2080] (running) *1 ??? (kernel.release.t6000 + 3300632) [0xfffffe0008ac1d18] (running) *1 ??? (kernel.release.t6000 + 3298548) [0xfffffe0008ac14f4] (running) *1 ??? (kernel.release.t6000 + 3297092) [0xfffffe0008ac0f44] (running) *6 ??? (kernel.release.t6000 + 3298280) [0xfffffe0008ac13e8] *5 ??? (kernel.release.t6000 + 3298280) [0xfffffe0008ac13e8] (running) *1 ??? (kernel.release.t6000 + 499356) [0xfffffe0008815e9c] *1 ??? (kernel.release.t6000 + 1867128) [0xfffffe0008963d78] *1 ??? (kernel.release.t6000 + 346944) [0xfffffe00087f0b40] *1 ??? (kernel.release.t6000 + 615856) [0xfffffe00088325b0] *1 ??? (kernel.release.t6000 + 621360) [0xfffffe0008833b30] (runnable) *1 ??? (kernel.release.t6000 + 3297092) [0xfffffe0008ac0f44] (running) *10 ??? (kernel.release.t6000 + 3647904) [0xfffffe0008b169a0] *9 ??? (kernel.release.t6000 + 3647904) [0xfffffe0008b169a0] (running) *1 ??? (kernel.release.t6000 + 3295124) [0xfffffe0008ac0794] (running) *1 ??? (kernel.release.t6000 + 3647728) [0xfffffe0008b168f0] (running) *60 ??? (kernel.release.t6000 + 3650176) [0xfffffe0008b17280] (running) *19 ??? (kernel.release.t6000 + 3626972) [0xfffffe0008b117dc] *19 IOTaskHasEntitlement + 84 (kernel.release.t6000 + 8934680) [0xfffffe0009021518] *16 OSEntitlementsBridge_matchBool(void const*, char const*) + 48 (com.apple.driver.AppleMobileFileIntegrity + 62192) [0xfffffe0009e74a70] *11 OSEntitlements::matchBool(char const*) + 292 (com.apple.driver.AppleMobileFileIntegrity + 134132) [0xfffffe0009e86374] *11 invocation function for block in OSEntitlements::matchBool(char const*) + 128 (com.apple.driver.AppleMobileFileIntegrity + 134360) [0xfffffe0009e86458] *9 CEContextValueForKey + 228 (com.apple.driver.AppleMobileFileIntegrity + 162668) [0xfffffe0009e8d2ec] *3 CEContextValueForKey + 228 (com.apple.driver.AppleMobileFileIntegrity + 162668) [0xfffffe0009e8d2ec] (running) *3 der_vm_execute_nocopy + 2128 (com.apple.driver.AppleMobileFileIntegrity + 188336) [0xfffffe0009e93730] *2 der_decode_key_value + 80 (com.apple.driver.AppleMobileFileIntegrity + 203804) [0xfffffe0009e9739c] *2 der_decode_string + 56 (com.apple.driver.AppleMobileFileIntegrity + 202800) [0xfffffe0009e96fb0] *2 ccder_blob_decode_range_internal + 56 (com.apple.kec.corecrypto + 72184) [0xfffffe000bbc3a78] *2 ccder_blob_decode_range_internal + 56 (com.apple.kec.corecrypto + 72184) [0xfffffe000bbc3a78] (running) *1 der_vm_execute_nocopy + 2128 (com.apple.driver.AppleMobileFileIntegrity + 188336) [0xfffffe0009e93730] (running) *2 der_vm_execute_nocopy + 2148 (com.apple.driver.AppleMobileFileIntegrity + 188356) [0xfffffe0009e93744] (running) *1 der_vm_execute_nocopy + 2072 (com.apple.driver.AppleMobileFileIntegrity + 188280) [0xfffffe0009e936f8] *1 der_decode_next + 88 (com.apple.driver.AppleMobileFileIntegrity + 202092) [0xfffffe0009e96cec] (running) *2 CEContextValueForKey + 60 (com.apple.driver.AppleMobileFileIntegrity + 162500) [0xfffffe0009e8d244] *2 CEContextValueForKey + 60 (com.apple.driver.AppleMobileFileIntegrity + 162500) [0xfffffe0009e8d244] (running) *2 OSEntitlements::matchBool(char const*) + 300 (com.apple.driver.AppleMobileFileIntegrity + 134140) [0xfffffe0009e8637c] *2 lck_rw_unlock_shared + 28 (kernel.release.t6000 + 511012) [0xfffffe0008818c24] *2 lck_rw_unlock_shared + 28 (kernel.release.t6000 + 511012) [0xfffffe0008818c24] (running) *1 OSEntitlements::matchBool(char const*) + 332 (com.apple.driver.AppleMobileFileIntegrity + 134172) [0xfffffe0009e8639c] (running) *1 OSEntitlements::matchBool(char const*) + 300 (com.apple.driver.AppleMobileFileIntegrity + 134140) [0xfffffe0009e8637c] (running) *1 OSEntitlements::matchBool(char const*) + 276 (com.apple.driver.AppleMobileFileIntegrity + 134116) [0xfffffe0009e86364] *1 OSEntitlements::getReadOnlyData() + 144 (com.apple.driver.AppleMobileFileIntegrity + 127252) [0xfffffe0009e84894] (running) *3 OSEntitlementsBridge_matchBoolWithProc(proc*, char const*) + 28 (com.apple.driver.AppleMobileFileIntegrity + 62252) [0xfffffe0009e74aac] *1 getOSEntitlements(proc*) + 48 (com.apple.driver.AppleMobileFileIntegrity + 53816) [0xfffffe0009e729b8] *1 getOSEntitlements(proc*) + 48 (com.apple.driver.AppleMobileFileIntegrity + 53816) [0xfffffe0009e729b8] (running) *1 getOSEntitlements(proc*) + 36 (com.apple.driver.AppleMobileFileIntegrity + 53804) [0xfffffe0009e729ac] *1 getOSEntitlements(ucred*) + 68 (com.apple.driver.AppleMobileFileIntegrity + 53724) [0xfffffe0009e7295c] (running) *1 getOSEntitlements(proc*) + 28 (com.apple.driver.AppleMobileFileIntegrity + 53796) [0xfffffe0009e729a4] *1 getOSEntitlements(proc*) + 28 (com.apple.driver.AppleMobileFileIntegrity + 53796) [0xfffffe0009e729a4] (running) *12 ??? (kernel.release.t6000 + 3634024) [0xfffffe0008b13368] (running) *8 ??? (kernel.release.t6000 + 3626972) [0xfffffe0008b117dc] (running) *126 ??? (kernel.release.t6000 + 3650232) [0xfffffe0008b172b8] *111 ??? (kernel.release.t6000 + 3660112) [0xfffffe0008b19950] *101 ??? (kernel.release.t6000 + 3830528) [0xfffffe0008b43300] (running) *3 ??? (kernel.release.t6000 + 3830464) [0xfffffe0008b432c0] *3 ??? (kernel.release.t6000 + 3830464) [0xfffffe0008b432c0] (running) *2 ??? (kernel.release.t6000 + 3830696) [0xfffffe0008b433a8] *2 ??? (kernel.release.t6000 + 3830696) [0xfffffe0008b433a8] (running) *1 ??? (kernel.release.t6000 + 3830600) [0xfffffe0008b43348] *1 ??? (kernel.release.t6000 + 3830600) [0xfffffe0008b43348] (running) *1 ??? (kernel.release.t6000 + 3830600) [0xfffffe0008b43348] (running) *1 ??? (kernel.release.t6000 + 3830544) [0xfffffe0008b43310] *1 ??? (kernel.release.t6000 + 3830544) [0xfffffe0008b43310] (running) *1 ??? (kernel.release.t6000 + 3830464) [0xfffffe0008b432c0] (running) *1 ??? (kernel.release.t6000 + 31936) [0xfffffe00087a3cc0] *1 ??? (kernel.release.t6000 + 32400) [0xfffffe00087a3e90] *1 ??? (kernel.release.t6000 + 346944) [0xfffffe00087f0b40] *1 ??? (kernel.release.t6000 + 615856) [0xfffffe00088325b0] *1 ??? (kernel.release.t6000 + 621360) [0xfffffe0008833b30] (runnable) *8 ??? (kernel.release.t6000 + 3660112) [0xfffffe0008b19950] (running) *7 ??? (kernel.release.t6000 + 3650232) [0xfffffe0008b172b8] (running) *50 ??? (kernel.release.t6000 + 3649004) [0xfffffe0008b16dec] *19 ??? (kernel.release.t6000 + 3657712) [0xfffffe0008b18ff0] *17 csproc_get_platform_binary + 164 (kernel.release.t6000 + 5745032) [0xfffffe0008d16988] *15 ubc_cs_blob_get + 532 (kernel.release.t6000 + 6385976) [0xfffffe0008db3138] *15 ubc_cs_blob_get + 532 (kernel.release.t6000 + 6385976) [0xfffffe0008db3138] (running) *2 csproc_get_platform_binary + 164 (kernel.release.t6000 + 5745032) [0xfffffe0008d16988] (running) *1 csproc_get_platform_binary + 76 (kernel.release.t6000 + 5744944) [0xfffffe0008d16930] *1 csproc_get_platform_binary + 76 (kernel.release.t6000 + 5744944) [0xfffffe0008d16930] (running) *1 csproc_get_platform_binary + 76 (kernel.release.t6000 + 5744944) [0xfffffe0008d16930] (running) *12 ??? (kernel.release.t6000 + 3658036) [0xfffffe0008b19134] *11 csproc_get_platform_binary + 164 (kernel.release.t6000 + 5745032) [0xfffffe0008d16988] *10 ubc_cs_blob_get + 532 (kernel.release.t6000 + 6385976) [0xfffffe0008db3138] *10 ubc_cs_blob_get + 532 (kernel.release.t6000 + 6385976) [0xfffffe0008db3138] (running) *1 csproc_get_platform_binary + 164 (kernel.release.t6000 + 5745032) [0xfffffe0008d16988] (running) *1 csproc_get_platform_binary + 76 (kernel.release.t6000 + 5744944) [0xfffffe0008d16930] *1 csproc_get_platform_binary + 76 (kernel.release.t6000 + 5744944) [0xfffffe0008d16930] (running) *8 ??? (kernel.release.t6000 + 3657752) [0xfffffe0008b19018] *7 csproc_get_platform_binary + 164 (kernel.release.t6000 + 5745032) [0xfffffe0008d16988] *4 ubc_cs_blob_get + 532 (kernel.release.t6000 + 6385976) [0xfffffe0008db3138] *4 ubc_cs_blob_get + 532 (kernel.release.t6000 + 6385976) [0xfffffe0008db3138] (running) *3 csproc_get_platform_binary + 164 (kernel.release.t6000 + 5745032) [0xfffffe0008d16988] (running) *1 csproc_get_platform_binary + 76 (kernel.release.t6000 + 5744944) [0xfffffe0008d16930] *1 csproc_get_platform_binary + 76 (kernel.release.t6000 + 5744944) [0xfffffe0008d16930] (running) *4 ??? (kernel.release.t6000 + 3658372) [0xfffffe0008b19284] (running) *2 ??? (kernel.release.t6000 + 3656692) [0xfffffe0008b18bf4] (running) *1 ??? (kernel.release.t6000 + 3659416) [0xfffffe0008b19698] (running) *1 ??? (kernel.release.t6000 + 3657740) [0xfffffe0008b1900c] *1 ??? (kernel.release.t6000 + 3657740) [0xfffffe0008b1900c] (running) *1 ??? (kernel.release.t6000 + 3657108) [0xfffffe0008b18d94] *1 ??? (kernel.release.t6000 + 3657108) [0xfffffe0008b18d94] (running) *1 ??? (kernel.release.t6000 + 3656604) [0xfffffe0008b18b9c] (running) *1 ??? (kernel.release.t6000 + 3656348) [0xfffffe0008b18a9c] *1 ??? (kernel.release.t6000 + 3656348) [0xfffffe0008b18a9c] (running) *25 ??? (kernel.release.t6000 + 3654724) [0xfffffe0008b18444] *22 IOTaskHasEntitlement + 84 (kernel.release.t6000 + 8934680) [0xfffffe0009021518] *14 OSEntitlementsBridge_matchBool(void const*, char const*) + 48 (com.apple.driver.AppleMobileFileIntegrity + 62192) [0xfffffe0009e74a70] *12 OSEntitlements::matchBool(char const*) + 292 (com.apple.driver.AppleMobileFileIntegrity + 134132) [0xfffffe0009e86374] *11 invocation function for block in OSEntitlements::matchBool(char const*) + 128 (com.apple.driver.AppleMobileFileIntegrity + 134360) [0xfffffe0009e86458] *10 CEContextValueForKey + 228 (com.apple.driver.AppleMobileFileIntegrity + 162668) [0xfffffe0009e8d2ec] *3 CEContextValueForKey + 228 (com.apple.driver.AppleMobileFileIntegrity + 162668) [0xfffffe0009e8d2ec] (running) *2 der_vm_execute_nocopy + 2072 (com.apple.driver.AppleMobileFileIntegrity + 188280) [0xfffffe0009e936f8] *2 der_decode_next + 72 (com.apple.driver.AppleMobileFileIntegrity + 202076) [0xfffffe0009e96cdc] (running) *2 der_vm_execute_nocopy + 2148 (com.apple.driver.AppleMobileFileIntegrity + 188356) [0xfffffe0009e93744] *1 CEBuffer_cmp + 124 (com.apple.driver.AppleMobileFileIntegrity + 203676) [0xfffffe0009e9731c] (running) *1 der_vm_execute_nocopy + 2148 (com.apple.driver.AppleMobileFileIntegrity + 188356) [0xfffffe0009e93744] (running) *2 der_vm_execute_nocopy + 2128 (com.apple.driver.AppleMobileFileIntegrity + 188336) [0xfffffe0009e93730] *1 der_decode_key_value + 80 (com.apple.driver.AppleMobileFileIntegrity + 203804) [0xfffffe0009e9739c] *1 der_decode_string + 56 (com.apple.driver.AppleMobileFileIntegrity + 202800) [0xfffffe0009e96fb0] (running) *1 der_decode_key_value + 60 (com.apple.driver.AppleMobileFileIntegrity + 203784) [0xfffffe0009e97388] *1 der_decode_key_value + 60 (com.apple.driver.AppleMobileFileIntegrity + 203784) [0xfffffe0009e97388] (running) *1 der_vm_execute_nocopy + 2148 (com.apple.driver.AppleMobileFileIntegrity + 188356) [0xfffffe0009e93744] (running) *1 CEContextValueForKey + 228 (com.apple.driver.AppleMobileFileIntegrity + 162668) [0xfffffe0009e8d2ec] (running) *1 invocation function for block in OSEntitlements::matchBool(char const*) + 208 (com.apple.driver.AppleMobileFileIntegrity + 134440) [0xfffffe0009e864a8] *1 invocation function for block in OSEntitlements::matchBool(char const*) + 208 (com.apple.driver.AppleMobileFileIntegrity + 134440) [0xfffffe0009e864a8] (running) *1 OSEntitlements::matchBool(char const*) + 300 (com.apple.driver.AppleMobileFileIntegrity + 134140) [0xfffffe0009e8637c] *1 lck_rw_unlock_shared + 28 (kernel.release.t6000 + 511012) [0xfffffe0008818c24] *1 lck_rw_unlock_shared + 28 (kernel.release.t6000 + 511012) [0xfffffe0008818c24] (running) *1 OSEntitlements::matchBool(char const*) + 276 (com.apple.driver.AppleMobileFileIntegrity + 134116) [0xfffffe0009e86364] *1 OSEntitlements::getReadOnlyData() + 184 (com.apple.driver.AppleMobileFileIntegrity + 127292) [0xfffffe0009e848bc] *1 OSEntitlements::getReadOnlyData() + 184 (com.apple.driver.AppleMobileFileIntegrity + 127292) [0xfffffe0009e848bc] (running) *6 OSEntitlementsBridge_matchBoolWithProc(proc*, char const*) + 28 (com.apple.driver.AppleMobileFileIntegrity + 62252) [0xfffffe0009e74aac] *3 getOSEntitlements(proc*) + 28 (com.apple.driver.AppleMobileFileIntegrity + 53796) [0xfffffe0009e729a4] *2 getOSEntitlements(proc*) + 28 (com.apple.driver.AppleMobileFileIntegrity + 53796) [0xfffffe0009e729a4] (running) *1 kauth_cred_proc_ref + 76 (kernel.release.t6000 + 5733184) [0xfffffe0008d13b40] (running) *1 getOSEntitlements(proc*) + 36 (com.apple.driver.AppleMobileFileIntegrity + 53804) [0xfffffe0009e729ac] *1 getOSEntitlements(ucred*) + 68 (com.apple.driver.AppleMobileFileIntegrity + 53724) [0xfffffe0009e7295c] (running) *1 getOSEntitlements(proc*) + 36 (com.apple.driver.AppleMobileFileIntegrity + 53804) [0xfffffe0009e729ac] (running) *1 getOSEntitlements(proc*) + 28 (com.apple.driver.AppleMobileFileIntegrity + 53796) [0xfffffe0009e729a4] (running) *1 OSEntitlementsBridge_matchBool(void const*, char const*) + 36 (com.apple.driver.AppleMobileFileIntegrity + 62180) [0xfffffe0009e74a64] *1 OSMetaClassBase::safeMetaCast(OSMetaClassBase const*, OSMetaClass const*) + 64 (kernel.release.t6000 + 7387564) [0xfffffe0008ea79ac] (running) *1 IOTaskHasEntitlement + 84 (kernel.release.t6000 + 8934680) [0xfffffe0009021518] (running) *2 IOTaskHasEntitlement + 60 (kernel.release.t6000 + 8934656) [0xfffffe0009021500] (running) *1 IOTaskHasEntitlement + 84 (kernel.release.t6000 + 8934680) [0xfffffe0009021518] (running) *8 ??? (kernel.release.t6000 + 3654636) [0xfffffe0008b183ec] *6 csproc_get_platform_binary + 164 (kernel.release.t6000 + 5745032) [0xfffffe0008d16988] *6 ubc_cs_blob_get + 532 (kernel.release.t6000 + 6385976) [0xfffffe0008db3138] *6 ubc_cs_blob_get + 532 (kernel.release.t6000 + 6385976) [0xfffffe0008db3138] (running) *2 ??? (kernel.release.t6000 + 3654636) [0xfffffe0008b183ec] (running) *7 ??? (kernel.release.t6000 + 3649736) [0xfffffe0008b170c8] (running) *3 ??? (kernel.release.t6000 + 3650768) [0xfffffe0008b174d0] (running) *1 ??? (kernel.release.t6000 + 3654744) [0xfffffe0008b18458] *1 ??? (kernel.release.t6000 + 3654744) [0xfffffe0008b18458] (running) *1 ??? (kernel.release.t6000 + 3650232) [0xfffffe0008b172b8] (running) *1 ??? (kernel.release.t6000 + 3650176) [0xfffffe0008b17280] (running) *1 ??? (kernel.release.t6000 + 3648604) [0xfffffe0008b16c5c] *1 ??? (kernel.release.t6000 + 3648604) [0xfffffe0008b16c5c] (running) *2 ??? (kernel.release.t6000 + 6466972) [0xfffffe0008dc6d9c] (running) *1 ??? (kernel.release.t6000 + 6466924) [0xfffffe0008dc6d6c] (running) *1 ??? (kernel.release.t6000 + 6466756) [0xfffffe0008dc6cc4] (running) *1 ??? (kernel.release.t6000 + 6466316) [0xfffffe0008dc6b0c] *1 ??? (kernel.release.t6000 + 6454408) [0xfffffe0008dc3c88] *1 ??? (kernel.release.t6000 + 6454408) [0xfffffe0008dc3c88] (running) *18 ??? (kernel.release.t6000 + 6536112) [0xfffffe0008dd7bb0] *16 ??? (kernel.release.t6000 + 9357344) [0xfffffe0009088820] *15 cred_check_socket + 172 (com.apple.security.sandbox + 74272) [0xfffffe000b872d60] *14 cred_sb_evaluate + 212 (com.apple.security.sandbox + 47228) [0xfffffe000b86c3bc] *8 sb_evaluate_internal + 344 (com.apple.security.sandbox + 110500) [0xfffffe000b87bae4] *4 eval + 6896 (com.apple.security.sandbox + 119800) [0xfffffe000b87df38] (running) *2 eval + 4652 (com.apple.security.sandbox + 117556) [0xfffffe000b87d674] *2 AppleMobileFileIntegrity::AMFIEntitlementGetBool(ucred*, char const*, bool*) + 40 (com.apple.driver.AppleMobileFileIntegrity + 81724) [0xfffffe0009e796bc] *1 OSEntitlements::matchBool(char const*) + 300 (com.apple.driver.AppleMobileFileIntegrity + 134140) [0xfffffe0009e8637c] *1 lck_rw_unlock_shared + 28 (kernel.release.t6000 + 511012) [0xfffffe0008818c24] *1 lck_rw_unlock_shared + 28 (kernel.release.t6000 + 511012) [0xfffffe0008818c24] (running) *1 OSEntitlements::matchBool(char const*) + 292 (com.apple.driver.AppleMobileFileIntegrity + 134132) [0xfffffe0009e86374] *1 invocation function for block in OSEntitlements::matchBool(char const*) + 208 (com.apple.driver.AppleMobileFileIntegrity + 134440) [0xfffffe0009e864a8] *1 invocation function for block in OSEntitlements::matchBool(char const*) + 208 (com.apple.driver.AppleMobileFileIntegrity + 134440) [0xfffffe0009e864a8] (running) *1 eval + 4652 (com.apple.security.sandbox + 117556) [0xfffffe000b87d674] (running) *1 eval + 4612 (com.apple.security.sandbox + 117516) [0xfffffe000b87d64c] *1 _readstr + 64 (com.apple.security.sandbox + 123316) [0xfffffe000b87ecf4] (running) *3 sb_evaluate_internal + 288 (com.apple.security.sandbox + 110444) [0xfffffe000b87baac] *3 eval + 8032 (com.apple.security.sandbox + 120936) [0xfffffe000b87e3a8] (running) *1 sb_evaluate_internal + 320 (com.apple.security.sandbox + 110476) [0xfffffe000b87bacc] *1 profile_release_transient + 32 (com.apple.security.sandbox + 142684) [0xfffffe000b88389c] *1 profile_get_dynamic_state + 44 (com.apple.security.sandbox + 142164) [0xfffffe000b883694] (running) *1 sb_evaluate_internal + 252 (com.apple.security.sandbox + 110408) [0xfffffe000b87ba88] *1 bastion_profile_retain_transient + 116 (com.apple.security.sandbox + 279252) [0xfffffe000b8a4e14] *1 lck_rw_unlock_shared + 28 (kernel.release.t6000 + 511012) [0xfffffe0008818c24] *1 lck_rw_unlock_shared + 28 (kernel.release.t6000 + 511012) [0xfffffe0008818c24] (running) *1 sb_evaluate_internal + 92 (com.apple.security.sandbox + 110248) [0xfffffe000b87b9e8] *1 free_filter_context + 136 (com.apple.security.sandbox + 108240) [0xfffffe000b87b210] (running) *1 cred_sb_evaluate + 212 (com.apple.security.sandbox + 47228) [0xfffffe000b86c3bc] (running) *1 cred_check_socket + 72 (com.apple.security.sandbox + 74172) [0xfffffe000b872cfc] (running) *1 ??? (kernel.release.t6000 + 9357496) [0xfffffe00090888b8] (running) *1 ??? (kernel.release.t6000 + 9357344) [0xfffffe0009088820] (running) *17 ??? (kernel.release.t6000 + 6535892) [0xfffffe0008dd7ad4] *15 file_socket + 64 (kernel.release.t6000 + 5775044) [0xfffffe0008d1dec4] *9 ??? (kernel.release.t6000 + 5771968) [0xfffffe0008d1d2c0] *9 ??? (kernel.release.t6000 + 5771968) [0xfffffe0008d1d2c0] (running) *6 file_socket + 64 (kernel.release.t6000 + 5775044) [0xfffffe0008d1dec4] (running) *2 file_socket + 64 (kernel.release.t6000 + 5775044) [0xfffffe0008d1dec4] (running) *10 ??? (kernel.release.t6000 + 6536396) [0xfffffe0008dd7ccc] *10 file_drop + 440 (kernel.release.t6000 + 5776116) [0xfffffe0008d1e2f4] *10 file_drop + 440 (kernel.release.t6000 + 5776116) [0xfffffe0008d1e2f4] (running) *9 ??? (kernel.release.t6000 + 6536024) [0xfffffe0008dd7b58] *6 copyin + 308 (kernel.release.t6000 + 1787724) [0xfffffe000895074c] (running) *2 ??? (kernel.release.t6000 + 6536024) [0xfffffe0008dd7b58] (running) *1 copyin + 464 (kernel.release.t6000 + 1787880) [0xfffffe00089507e8] (running) *1 ??? (kernel.release.t6000 + 6536336) [0xfffffe0008dd7c90] *1 ??? (kernel.release.t6000 + 6536336) [0xfffffe0008dd7c90] (running) *1 ??? (kernel.release.t6000 + 6536336) [0xfffffe0008dd7c90] (running) *3 ??? (kernel.release.t6000 + 7361980) [0xfffffe0008ea15bc] *3 ??? (kernel.release.t6000 + 7361980) [0xfffffe0008ea15bc] (running) *1 ??? (kernel.release.t6000 + 7361980) [0xfffffe0008ea15bc] (running) *20 ??? (kernel.release.t6000 + 1828900) [0xfffffe000895a824] (running) *1 ??? (kernel.release.t6000 + 1829088) [0xfffffe000895a8e0] (running) *1 ??? (kernel.release.t6000 + 347800) [0xfffffe00087f0e98] (runnable) 17 __connect + 8 (libsystem_kernel.dylib + 20736) [0x186ff4100] (running) 1 __error + 0 (libsystem_kernel.dylib + 5628) [0x186ff05fc] (running) 1 dns_so_check + 1900 (dirmngr + 240972) [0x10235ed4c] 1 __connect + 28 (libsystem_kernel.dylib + 20756) [0x186ff4114] 1 cerror + 28 (libsystem_kernel.dylib + 9392) [0x186ff14b0] (running) Thread 0x36119 1001 samples (1-1001) priority 31 (base 31) 1001 thread_start + 8 (libsystem_pthread.dylib + 7040) [0x18702cb80] 1001 _pthread_start + 136 (libsystem_pthread.dylib + 27660) [0x187031c0c] 1001 thread_start + 76 (libnpth.0.dylib + 11376) [0x1023fec70] 1001 start_connection_thread + 232 (dirmngr + 19540) [0x102328c54] 1001 start_command_handler + 544 (dirmngr + 22004) [0x1023295f4] 1001 assuan_process + 160 (libassuan.9.dylib + 31692) [0x102417bcc] 1001 dispatch_command + 600 (libassuan.9.dylib + 35592) [0x102418b08] 1001 cmd_ks_get + 780 (dirmngr + 35824) [0x10232cbf0] 1001 ks_action_get + 488 (dirmngr + 154756) [0x102349c84] 1001 ks_hkp_get + 456 (dirmngr + 164688) [0x10234c350] 1001 make_host_part + 620 (dirmngr + 158976) [0x10234ad00] 1001 npth_mutex_lock + 60 (libnpth.0.dylib + 11636) [0x1023fed74] 1001 _pthread_mutex_firstfit_lock_slow + 220 (libsystem_pthread.dylib + 6208) [0x18702c840] 1001 1001 __psynch_mutexwait + 8 (libsystem_kernel.dylib + 14492) [0x186ff289c] *1001 psynch_mtxcontinue + 0 (com.apple.kec.pthread + 9968) [0xfffffe000bcd3ea0] (blocked by turnstile waiting for dirmngr [9541] thread 0x36118) Binary Images: 0x102324000 - 0x1023abfff dirmngr (0) <95FFA4DD-B5F1-3736-878E-39B3B7B2D60B> /usr/local/MacGPG2/bin/dirmngr 0x1023fc000 - 0x102407fff libnpth.0.dylib (0) <035AD48E-5539-3B08-B484-50F125A41714> /usr/local/MacGPG2/lib/libnpth.0.dylib 0x102410000 - 0x102427fff libassuan.9.dylib (0) <3EFF266B-06BB-3AFF-925C-7B167EB8F3C4> /usr/local/MacGPG2/lib/libassuan.9.dylib 0x186c8c000 - 0x186d26b03 dyld (1284.13) <46D42BFA-B2B0-3CE5-A3D9-6BA9FF4607AA> /usr/lib/dyld 0x186e78000 - 0x186ebe71f libdispatch.dylib (1521.100.8) <3329EB0A-E722-3DB0-A627-E27297282A0F> /usr/lib/system/libdispatch.dylib 0x186fef000 - 0x18702a30b libsystem_kernel.dylib (11417.101.15) <225CB279-20A9-381D-A163-D2BE263F5327> /usr/lib/system/libsystem_kernel.dylib 0x18702b000 - 0x187037a47 libsystem_pthread.dylib (536) <8D27EC9A-D919-31A4-8DF8-31A2FD2E593C> /usr/lib/system/libsystem_pthread.dylib *0xfffffe000879c000 - 0xfffffe00090abfff kernel.release.t6000 (11417.101.15) <0DBF4FC4-B7A0-303C-9143-63308FC1EA62>__TEXT_EXEC /System/Library/Kernels/kernel.release.t6000 *0xfffffe0009e65780 - 0xfffffe0009e98cbb com.apple.driver.AppleMobileFileIntegrity (938.101.1) <4D3FB3E9-4EB8-3557-8A9E-F4063C3F45AA>__TEXT_EXEC com.apple.driver.AppleMobileFileIntegrity *0xfffffe000b860b40 - 0xfffffe000b8a5d83 com.apple.security.sandbox (2401.101.1) <460799ED-F203-3112-9706-1E2DA9884890>__TEXT_EXEC com.apple.security.sandbox *0xfffffe000bbb2080 - 0xfffffe000bc0cbc7 com.apple.kec.corecrypto (1736.100.95) <42AE5B91-709E-3E2E-8551-DF9790A31E7E>__TEXT_EXEC com.apple.kec.corecrypto *0xfffffe000bcd17b0 - 0xfffffe000bcd74a7 com.apple.kec.pthread (536) <6FEEDCE7-2184-3192-B98E-F71DE2AD4BF5>__TEXT_EXEC com.apple.kec.pthread From gniibe at fsij.org Thu Apr 3 03:23:27 2025 From: gniibe at fsij.org (NIIBE Yutaka) Date: Thu, 03 Apr 2025 10:23:27 +0900 Subject: Dirmngr - high cpu usage - 100% In-Reply-To: <30E005FC-1DBC-4976-909F-948938389645@gpgtools.org> References: <30E005FC-1DBC-4976-909F-948938389645@gpgtools.org> Message-ID: <87cydukpgw.fsf@haruna.fsij.org> Hello, Lukas | GPGTools wrote: > dirmngr of a self-compiled version of gnupg 2.4.7 on macOS 15.4 shows a constantly cpu usage of 99-100%. > From the spindump (attached) it appears that the problem is somehow related to DNS `dns_res_check` for example. > The same behavior could not be observed with gnupg 2.2.x. > > What is the best way to debug what is going wrong? I don't know how to debug on macOS, so, I describe about the symptom and the code. IIUC, the issue is in/around dirmngr/dns.c (USE_LIBDNS option at compile time), which does name resolving directly to DNS. I think that it is an option for macOS not to use this code. I'd recomment simply using the standard system name resolver, by no USE_LIBDNS option at compile time, or dirmngr runtime option of --standard-resolver. I checked the commit log of dirmngr/dns.c, but I can't find any meaningful changes between gnupg 2.2.x and gnupg 2.4.7 for this kind of problem. That's being said, I think that direct problems are the default behavior of dirmngr/dns.c: - default configuration reading /etc/resolv.conf, /etc/nsswitch.conf - default dns server (INADDR_ANY -> INADDR_LOOPBACK) - handling an error of connect(2) That is, the buggy behavior would be: when no /etc/resolv.conf, DNS server 0.0.0.0 -> 127.0.0.1 then, if no nameserver running on the machine, it loops forever calling connect(2). The code in question (for me) is the following: ========================== diff --git a/dirmngr/dns.c b/dirmngr/dns.c index e0eb33244..129502ce7 100644 --- a/dirmngr/dns.c +++ b/dirmngr/dns.c @@ -7749,6 +7749,10 @@ retry: error = dns_connect(so->udp, (struct sockaddr *)&so->remote, dns_sa_len(&so->remote)); dns_trace_sys_connect(so->trace, so->udp, SOCK_DGRAM, (struct sockaddr *)&so->remote, error); +#if 0 +/* This code is questionable; It seemed that it was based on OS + specific old behavior (not relevant these days) and/or confusion + reading man pages of irrelevant section. */ /* Linux returns EINVAL when address was bound to localhost and it's external IP address now. */ if (error == EINVAL) { @@ -7761,6 +7765,7 @@ retry: /* Error for previous socket operation may be reserved(?) asynchronously. */ goto udp_connect_retry; +#endif if (error) goto error; ========================== The description of ECONNREFUSED can be found in the udp(7) page (for socket(2)) for Linux kernel. But it's not for connect(2). ECONNREFUSED can be returned by connect(2) on POSIX system. Retrying (by goto udp_connect_retry) is wrong in the code. -- From gniibe at fsij.org Mon Apr 7 04:50:33 2025 From: gniibe at fsij.org (NIIBE Yutaka) Date: Mon, 07 Apr 2025 11:50:33 +0900 Subject: Dirmngr - high cpu usage - 100% In-Reply-To: <87cydukpgw.fsf@haruna.fsij.org> References: <30E005FC-1DBC-4976-909F-948938389645@gpgtools.org> <87cydukpgw.fsf@haruna.fsij.org> Message-ID: <87mscs65xi.fsf@haruna.fsij.org> Hello, again, NIIBE Yutaka wrote: > ECONNREFUSED can be returned by connect(2) on POSIX system. Retrying > (by goto udp_connect_retry) is wrong in the code. I found: https://dev.gnupg.org/T3374 Actually, it was me who considered wrongly for ECONNREFUSED. And we also have a ticket: https://dev.gnupg.org/T4021 I pushed a fix to master with the ticket of T4021. The commit is: 1ed8b0e7b40304368f0466b03b33c3c40becfc3c -- From lukele at gpgtools.org Mon Apr 7 12:01:02 2025 From: lukele at gpgtools.org (Lukas | GPGTools) Date: Mon, 7 Apr 2025 12:01:02 +0200 Subject: Dirmngr - high cpu usage - 100% In-Reply-To: <87mscs65xi.fsf@haruna.fsij.org> References: <30E005FC-1DBC-4976-909F-948938389645@gpgtools.org> <87cydukpgw.fsf@haruna.fsij.org> <87mscs65xi.fsf@haruna.fsij.org> Message-ID: <44CD722A-D731-41FB-8E1C-4F77E3B71E95@gpgtools.org> Hi NIIBE, thank you very much for your work and your answer! I still have to test the fix but figured out that when I build without libdns as you suggested dirmngr again works as expected. Much appreciated! Best, Lukas > On 07.04.2025, at 04:50, NIIBE Yutaka wrote: > > Hello, again, > > NIIBE Yutaka wrote: >> ECONNREFUSED can be returned by connect(2) on POSIX system. Retrying >> (by goto udp_connect_retry) is wrong in the code. > > I found: https://dev.gnupg.org/T3374 > > Actually, it was me who considered wrongly for ECONNREFUSED. > > And we also have a ticket: https://dev.gnupg.org/T4021 > > I pushed a fix to master with the ticket of T4021. > > The commit is: 1ed8b0e7b40304368f0466b03b33c3c40becfc3c > -- From wahern at akamai.com Thu Apr 10 00:34:35 2025 From: wahern at akamai.com (Ahern, William) Date: Wed, 9 Apr 2025 22:34:35 +0000 Subject: Issuer Tracker Account Request Message-ID: <7D9170F8-413D-4F6E-81D7-F5E7B2585744@akamai.com> Handle: wahern-akamai Display Name: William Ahern E-Mail Address: wahern at akamai.com From mattianarducci1 at gmail.com Mon Apr 14 21:59:26 2025 From: mattianarducci1 at gmail.com (Mattia Narducci) Date: Mon, 14 Apr 2025 21:59:26 +0200 Subject: Mattia Narducci DCO Message-ID: <5887939.DvuYhMxLoT@localhost> GnuPG Developer's Certificate of Origin. Version 1.0 ===================================================== By making a contribution to the GnuPG project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the free software license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate free software license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same free software license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the free software license(s) involved. Signed-off-by: Mattia Narducci -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: This is a digitally signed message part. URL: From mattianarducci1 at gmail.com Wed Apr 16 23:13:02 2025 From: mattianarducci1 at gmail.com (Mattia Narducci) Date: Wed, 16 Apr 2025 23:13:02 +0200 Subject: [PATCH gnupg] po: Fix misspelled italian translation for 'encrypted' Message-ID: <5007543.31r3eYUQgx@localhost> -- Signed-off-by: Mattia Narducci --- po/it.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/po/it.po b/po/it.po index 885cc7928..def18c125 100644 --- a/po/it.po +++ b/po/it.po @@ -4833,11 +4833,11 @@ msgstr "AVVISO: pi? testo in chiaro visti\n" #, c-format msgid "encrypted with %lu passphrases\n" -msgstr "cifratto con %lu passphrase\n" +msgstr "cifrato con %lu passphrase\n" #, c-format msgid "encrypted with 1 passphrase\n" -msgstr "cifratto con 1 passphrase\n" +msgstr "cifrato con 1 passphrase\n" #, c-format msgid "public key decryption failed: %s\n" -- 2.49.0 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: This is a digitally signed message part. URL: From ametzler at bebt.de Thu Apr 17 13:21:29 2025 From: ametzler at bebt.de (Andreas Metzler) Date: Thu, 17 Apr 2025 13:21:29 +0200 Subject: [patch] missing whitespace in docs Message-ID: Hello, this was originally reported in https://bugs.debian.org/1103219 by Bjarni Ingi Gislason cu Andreas -- `What a good friend you are to him, Dr. Maturin. His other friends are so grateful to you.' `I sew his ears on from time to time, sure' -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Add-missing-whitespace-gnupg7-manpage.patch Type: text/x-diff Size: 1074 bytes Desc: not available URL: From pschwabauer at intevation.de Wed Apr 23 17:48:46 2025 From: pschwabauer at intevation.de (Paul Schwabauer) Date: Wed, 23 Apr 2025 17:48:46 +0200 Subject: [PATCH gpgmepy] build: Fix compiler warnings Message-ID: <20250423154855.73749-2-pschwabauer@intevation.de> This initializes variables that could be uninitialized and removes the usage of deprecated functions. --- gpgme.i | 12 ++++++++---- helpers.c | 3 ++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/gpgme.i b/gpgme.i index f67c45a..0baa551 100644 --- a/gpgme.i +++ b/gpgme.i @@ -71,14 +71,14 @@ /* Likewise for a list of strings. */ %typemap(in) const char *[] (void *vector = NULL, - size_t size, + size_t size = 0, PyObject **pyVector = NULL) { /* Check if is a list */ if (PyList_Check($input)) { size_t i, j; size = PyList_Size($input); $1 = (char **) (vector = malloc((size+1) * sizeof(char *))); - pyVector = calloc(sizeof *pyVector, size); + pyVector = calloc(size, sizeof *pyVector); for (i = 0; i < size; i++) { PyObject *o = PyList_GetItem($input,i); @@ -319,8 +319,10 @@ else if (PyInt_Check($input)) $1 = PyInt_AsLong($input); #endif - else + else { PyErr_SetString(PyExc_TypeError, "Numeric argument expected"); + return NULL; + } } %typemap(out) off_t { @@ -342,8 +344,10 @@ else if (PyInt_Check($input)) $1 = PyInt_AsLong($input); #endif - else + else { PyErr_SetString(PyExc_TypeError, "Numeric argument expected"); + return NULL; + } } /* Those are for gpgme_data_read() and gpgme_strerror_r(). */ diff --git a/helpers.c b/helpers.c index 1ce7f48..50db70d 100644 --- a/helpers.c +++ b/helpers.c @@ -116,7 +116,8 @@ static void _gpg_stash_callback_exception(PyObject *weak_self) PyTuple_SetItem(excinfo, 2, Py_None); } - self = PyWeakref_GetObject(weak_self); + PyWeakref_GetRef(weak_self, &self); + Py_DECREF(self); /* self only has a borrowed reference. */ if (self == Py_None) { /* This should not happen, as even if we're called from the data -- 2.49.0 From pschwabauer at intevation.de Thu Apr 24 08:27:47 2025 From: pschwabauer at intevation.de (Paul Schwabauer) Date: Thu, 24 Apr 2025 08:27:47 +0200 Subject: [PATCH gpgmepy] dist: Improve header search Message-ID: <20250424062934.14970-2-pschwabauer@intevation.de> With this change, `/usr/include` will be searched for the required headers. Before this change, this was dead code as include_dirs is always set. --- setup.py.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py.in b/setup.py.in index 4cf8835..309bf42 100755 --- a/setup.py.in +++ b/setup.py.in @@ -106,7 +106,7 @@ if not gpgme_h: if os.path.exists(os.path.join('@prefix@', 'include', 'gpgme.h')): gpgme_h = os.path.join('@prefix@', 'include', 'gpgme.h') else: - for include_dir in (include_dirs or ['/usr/include']): + for include_dir in (include_dirs + ['/usr/include']): if os.path.exists(os.path.join(include_dir, 'gpgme.h')): gpgme_h = os.path.join(include_dir, 'gpgme.h') break -- 2.49.0 From pschwabauer at intevation.de Thu Apr 24 10:22:29 2025 From: pschwabauer at intevation.de (Paul Schwabauer) Date: Thu, 24 Apr 2025 10:22:29 +0200 Subject: gpgmepy: Broken sdist build Message-ID: I recently tried building a Python source distribution for |gpgmepy| using either |python setup.py sdist| or |make sdist| from the build directory. However, the resulting source tarball is incomplete; it?s missing several necessary files. You can verify this by running |python -m build|, which builds the package in an isolated environment and highlights the missing components. To work around this issue, I had to follow the approach described here: https://issues.roundup-tracker.org/msg8362. Unfortunately, due to the custom nature of |gpgmepy|'s build process, I haven't found a clean way to integrate this fix without potentially disrupting workflows that the package maintainers rely on. One complication is that |setuptools| requires the |MANIFEST.in| file, and the files it references, to be present in the current working directory during packaging. If anyone has insights into the |gpgmepy| build process or suggestions for integrating a more robust solution, I'd really appreciate the help. From ametzler at bebt.de Sat Apr 26 18:17:54 2025 From: ametzler at bebt.de (Andreas Metzler) Date: Sat, 26 Apr 2025 18:17:54 +0200 Subject: Please push git tag for libgpg-error 1.55 Message-ID: Hello, tarballs are availble but the tag is missing. TIA, cu Andreas -- `What a good friend you are to him, Dr. Maturin. His other friends are so grateful to you.' `I sew his ears on from time to time, sure' From collin.funk1 at gmail.com Wed Apr 30 06:01:44 2025 From: collin.funk1 at gmail.com (Collin Funk) Date: Tue, 29 Apr 2025 21:01:44 -0700 Subject: [PATCH gnupg] Fix gcc -Wunterminated-string-initialization warnings. Message-ID: <20250430040211.782774-1-collin.funk1@gmail.com> * common/ksba-io-support.c (ATTR_NONSTRING): New macro. (bintoasc): Mark with ATTR_NONSTRING. (has_only_base64): Use memchr since calling strchr on a non-NUL terminated string is undefined behavior. * dirmngr/dns.c (DNS_NONSTRING): New macro. (dns_aaaa_arpa, dns_sshfp_print): Mark a variable with DNS_NONSTRING. -- GnuPG-bug-id: 7629 Signed-off-by: Collin Funk --- common/ksba-io-support.c | 7 +++++-- dirmngr/dns.c | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/common/ksba-io-support.c b/common/ksba-io-support.c index 352485ffa..10419ab20 100644 --- a/common/ksba-io-support.c +++ b/common/ksba-io-support.c @@ -51,6 +51,9 @@ #define LF "\n" #endif +#if __GNUC__ >= 8 +# define ATTR_NONSTRING __attribute__ ((__nonstring__)) +#endif /* Data used by the reader callbacks. */ struct reader_cb_parm_s @@ -134,7 +137,7 @@ struct gnupg_ksba_io_s { /* The base-64 character list */ -static char bintoasc[64] = +static char bintoasc[64] ATTR_NONSTRING = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" "0123456789+/"; @@ -174,7 +177,7 @@ has_only_base64 (const unsigned char *line, int linelen) { if (*line == '\n' || (linelen > 1 && *line == '\r' && line[1] == '\n')) break; - if ( !strchr (bintoasc, *line) ) + if ( !memchr (bintoasc, *line, sizeof (bintoasc)) ) return 0; } return 1; /* yes */ diff --git a/dirmngr/dns.c b/dirmngr/dns.c index 5c7bb08d8..bfab59f13 100644 --- a/dirmngr/dns.c +++ b/dirmngr/dns.c @@ -131,6 +131,9 @@ typedef int socket_fd_t; #if __GNUC__ #define DNS_NOTUSED __attribute__((unused)) #define DNS_NORETURN __attribute__((__noreturn__)) +#if __GNUC__ >= 8 +#define DNS_NONSTRING __attribute__((__nonstring__)) +#endif #else #define DNS_NOTUSED #define DNS_NORETURN @@ -3441,7 +3444,7 @@ static int dns_aaaa_cmp0(const void *a, const void *b) { } size_t dns_aaaa_arpa(void *_dst, size_t lim, const struct dns_aaaa *aaaa) { - static const unsigned char hex[16] = "0123456789abcdef"; + static const unsigned char hex[16] DNS_NONSTRING = "0123456789abcdef"; struct dns_buf dst = DNS_B_INTO(_dst, lim); unsigned nyble; int i, j; @@ -4222,7 +4225,7 @@ static int dns_sshfp_cmp0(const void *a, const void *b) { size_t dns_sshfp_print(void *_dst, size_t lim, struct dns_sshfp *fp) { - static const unsigned char hex[16] = "0123456789abcdef"; + static const unsigned char hex[16] DNS_NONSTRING = "0123456789abcdef"; struct dns_buf dst = DNS_B_INTO(_dst, lim); size_t i; -- 2.49.0 From collin.funk1 at gmail.com Wed Apr 30 07:21:46 2025 From: collin.funk1 at gmail.com (Collin Funk) Date: Tue, 29 Apr 2025 22:21:46 -0700 Subject: DCO for Collin Funk Message-ID: <87y0vi5imt.fsf@gmail.com> GnuPG Developer's Certificate of Origin. Version 1.0 ===================================================== By making a contribution to the GnuPG project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the free software license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate free software license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same free software license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the free software license(s) involved. Signed-off-by: Collin Funk -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: From wk at gnupg.org Wed Apr 30 10:27:15 2025 From: wk at gnupg.org (Werner Koch) Date: Wed, 30 Apr 2025 10:27:15 +0200 Subject: [PATCH gnupg] Fix gcc -Wunterminated-string-initialization warnings. In-Reply-To: <20250430040211.782774-1-collin.funk1@gmail.com> (Collin Funk via Gnupg-devel's message of "Tue, 29 Apr 2025 21:01:44 -0700") References: <20250430040211.782774-1-collin.funk1@gmail.com> Message-ID: <8734dq6om4.fsf@jacob.g10code.de> Hi! On Tue, 29 Apr 2025 21:01, Collin Funk said: > (has_only_base64): Use memchr since calling strchr on a non-NUL > terminated string is undefined behavior. Very good catch. I was my fault 22 years ago: > -static char bintoasc[64] = > +static char bintoasc[64] ATTR_NONSTRING = > "ABCDEFGHIJKLMNOPQRSTUVWXYZ" > "abcdefghijklmnopqrstuvwxyz" > "0123456789+/"; That is actually similar code as in g10/armor.c; which however uses bintoasc[] and thus let the compiler determine the array size. I can only speculate that I used the 64 byte array because the inverse asctobin array has a fixed size on purpose. Thanks for the patch. I am going to apply this to all branches. Regarding the nonstring attribute we need to wait that we can make libgpg-error 1.55 a requirement. That version provides the GPGRT_ATTR_NONSTRING. For master we might soon make this a dependency but not for the other branches. Shalom-Salam, Werner -- The pioneers of a warless world are the youth that refuse military service. - A. Einstein -------------- next part -------------- A non-text attachment was scrubbed... Name: openpgp-digital-signature.asc Type: application/pgp-signature Size: 247 bytes Desc: not available URL: From pschwabauer at intevation.de Wed Apr 30 16:45:57 2025 From: pschwabauer at intevation.de (Paul Schwabauer) Date: Wed, 30 Apr 2025 16:45:57 +0200 Subject: gpgmepy: Broken sdist build In-Reply-To: References: Message-ID: <8b7dd882-fb96-47cc-aa03-bc2d075f0af5@intevation.de> I just realized (with the help of Bernhard Herzog) that building directly inside the source folder, instead of using a separate build folder, works without any issues. I can successfully create both a source distribution and a wheel package. Building in a separate folder needs still to be fixed, or at least documented. On 4/24/25 10:22, Paul Schwabauer wrote: > I recently tried building a Python source distribution for |gpgmepy| > using either |python setup.py sdist| or |make sdist| from the build > directory. However, the resulting source tarball is incomplete; it?s > missing several necessary files. > > You can verify this by running |python -m build|, which builds the > package in an isolated environment and highlights the missing components. > > To work around this issue, I had to follow the approach described > here: https://issues.roundup-tracker.org/msg8362. Unfortunately, due > to the custom nature of |gpgmepy|'s build process, I haven't found a > clean way to integrate this fix without potentially disrupting > workflows that the package maintainers rely on. > > One complication is that |setuptools| requires the |MANIFEST.in| file, > and the files it references, to be present in the current working > directory during packaging. > > If anyone has insights into the |gpgmepy| build process or suggestions > for integrating a more robust solution, I'd really appreciate the help. > From lists at sapience.com Wed Apr 30 18:34:32 2025 From: lists at sapience.com (Genes Lists) Date: Wed, 30 Apr 2025 12:34:32 -0400 Subject: gpgmepy: Broken sdist build => "make install fails" In-Reply-To: <8b7dd882-fb96-47cc-aa03-bc2d075f0af5@intevation.de> References: <8b7dd882-fb96-47cc-aa03-bc2d075f0af5@intevation.de> Message-ID: <19f72dbaa8a2d57abdecab7be40c09dc9383a7ed.camel@sapience.com> On Wed, 2025-04-30 at 16:45 +0200, Paul Schwabauer via Gnupg-devel wrote: > On a slightly related note, make install is now failing as below. Primary error seems to be : ? "NotImplementedError: Support for egg-based install has been removed" python 3.13.3 setuptools 80.0.0 on archlinux : thanks gene ----------- Errors are: /usr/lib/python3.13/site-packages/setuptools/_distutils/cmd.py:90: SetuptoolsDeprecationWarning: setup.py install is deprecated. Traceback (most recent call last): File "/mnt/lv_data/shared/src/abs/upstream/gnupg/gpgmepy- git/src/gpgmepy/build/setup.py", line 237, in setup( ~~~~~^ cmdclass={'build': BuildExtFirstHack}, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<5 lines>... ], ^^ ) ^ File "/usr/lib/python3.13/site-packages/setuptools/__init__.py", line 117, in setup return distutils.core.setup(**attrs) ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/usr/lib/python3.13/site- packages/setuptools/_distutils/core.py", line 186, in setup return run_commands(dist) File "/usr/lib/python3.13/site- packages/setuptools/_distutils/core.py", line 202, in run_commands dist.run_commands() ~~~~~~~~~~~~~~~~~^^ File "/usr/lib/python3.13/site- packages/setuptools/_distutils/dist.py", line 1002, in run_commands self.run_command(cmd) ~~~~~~~~~~~~~~~~^^^^^ File "/usr/lib/python3.13/site-packages/setuptools/dist.py", line 1104, in run_command super().run_command(command) ~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/usr/lib/python3.13/site- packages/setuptools/_distutils/dist.py", line 1021, in run_command cmd_obj.run() ~~~~~~~~~~~^^ File "/usr/lib/python3.13/site- packages/setuptools/command/install.py", line 105, in run self.do_egg_install() ~~~~~~~~~~~~~~~~~~~^^ File "/usr/lib/python3.13/site- packages/setuptools/command/install.py", line 143, in do_egg_install raise NotImplementedError("Support for egg-based install has been removed.") NotImplementedError: Support for egg-based install has been removed. make[2]: *** [Makefile:986: install-exec-local] Error 1 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: This is a digitally signed message part URL: From collin.funk1 at gmail.com Wed Apr 30 18:47:03 2025 From: collin.funk1 at gmail.com (Collin Funk) Date: Wed, 30 Apr 2025 09:47:03 -0700 Subject: [PATCH gnupg] Fix gcc -Wunterminated-string-initialization warnings. In-Reply-To: <8734dq6om4.fsf@jacob.g10code.de> References: <20250430040211.782774-1-collin.funk1@gmail.com> <8734dq6om4.fsf@jacob.g10code.de> Message-ID: <87msbxa96g.fsf@gmail.com> Hi Werner, Werner Koch writes: > On Tue, 29 Apr 2025 21:01, Collin Funk said: >> (has_only_base64): Use memchr since calling strchr on a non-NUL >> terminated string is undefined behavior. > > Very good catch. I was my fault 22 years ago: > [...] > Thanks for the patch. I am going to apply this to all branches. Thanks! It was the first time I was alerted to a bug by this new GCC 15 warning. The other cases I saw in Gnulib and Emacs were harmless. > Regarding the nonstring attribute we need to wait that we can make > libgpg-error 1.55 a requirement. That version provides the > GPGRT_ATTR_NONSTRING. For master we might soon make this a dependency > but not for the other branches. Sure, I saw that macro was recently added which was why my patch used internal macros. But if you prefer to not duplicate the GCC version checks and such that is fine by me. Collin -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: