[OpenIndiana-discuss] Fwd: Add inotify support to illumos-gate

Stephan Althaus Stephan.Althaus at Duedinghausen.eu
Tue May 9 10:24:16 UTC 2023


On 5/9/23 10:19, Udo Grabowski (IMK) wrote:
> On 09/05/2023 07:41, Stephan Althaus wrote:
>> On 5/8/23 16:10, Udo Grabowski (IMK) wrote:
>>> On 08/05/2023 11:13, Udo Grabowski (IMK) wrote:
>>>> On 05/05/2023 09:14, Stephan Althaus wrote:
>>>>> Hello!
>>>>>
>>>>> The hint to use inotify support in glib was from you, can you 
>>>>> please shed a
>>>>> light on this?
>>>>>
>>>>> I am lacking all sorts of background on this stuff :-{
>>>>>
>>>>> To test this, we would have to patch and build inotify support in 
>>>>> illumos-gate,
>>>>> install it, then compile glib2 with a check if inotify was found 
>>>>> and install,
>>>>> and then mate-system-monitor... to see if this approach does 
>>>>> indeed help.. Is
>>>>> there some easier way?
>>>>>
>>>>> Regards,
>>>>> Stephan
>>>>>
>>>>> -------- Forwarded Message --------
>>>>> Subject:     Re: [OpenIndiana-discuss] Add inotify support to 
>>>>> illumos-gate
>>>>> Date:     Tue, 2 May 2023 20:25:49 +0200
>>>>> From:     Till Wegmüller <toasterson at gmail.com>
>>>>> Reply-To:     Discussion list for OpenIndiana
>>>>> <openindiana-discuss at openindiana.org>
>>>>> To:     openindiana-discuss at openindiana.org
>>>>>
>>>>>
>>>>>
>>>>> Hi Stephan
>>>>>
>>>>> inotify has stubbed headers that work roughly decently. Any 
>>>>> software should use
>>>>> FEN or the Native API. We add it to every programming language we 
>>>>> can and should
>>>>> also add it to mate-system-monitor or rather make it use kstat if 
>>>>> it tries to
>>>>> poll things under /proc which it should not for us.
>>>>>
>>>>> What does mate-system-monitor use inotify for?
>>>>> ...
>>>>
>>>> The parts that use Gio for monitoring in mate-system-monitor are 
>>>> located
>>>> in prettytable.cpp, where it monitors its apps-cache, and in 
>>>> procman-app.cpp,
>>>> where it monitors mounts and somehow uses it to process a 
>>>> commandline; that's
>>>> also the place it crashes (after complaining about the missing monitor
>>>> facility):
>>>>
>>>> ...
>>>
>>>
>>> And still, even with LD_LIBRARY_PATH set to gcc 10, libgtkmm-3 again
>>> loads itself libstdc++.so.6 from gcc 7 AND 10, as well as libgcc_s.so.1
>>> from gcc 7 AND 10.
>>>
>>> And the same problem for libgdkmm-3, and libpangomm-1.4. Probably 
>>> because
>>> software that is still compiled with gcc 7 depends on them.
>>>
>>> This mixup should be cleared first.
>>>
>>> All libraries loaded from mate-system-monitor that depend on gcc:
>>>
>>> ############ /usr/lib/64/libgtkmm-3.0.so.1 ###############
>>>         libstdc++.so.6 => /usr/gcc/7/lib/amd64/libstdc++.so.6
>>>         libgcc_s.so.1 => /usr/gcc/7/lib/amd64/libgcc_s.so.1
>>>         libstdc++.so.6 => /usr/gcc/10/lib/amd64/libstdc++.so.6
>>>         libgcc_s.so.1 => /usr/gcc/10/lib/amd64/libgcc_s.so.1
>>> ############ /usr/lib/64/libgdkmm-3.0.so.1 ###############
>>>         libstdc++.so.6 => /usr/gcc/7/lib/amd64/libstdc++.so.6
>>>         libgcc_s.so.1 => /usr/gcc/7/lib/amd64/libgcc_s.so.1
>>>         libstdc++.so.6 => /usr/gcc/10/lib/amd64/libstdc++.so.6
>>>         libgcc_s.so.1 => /usr/gcc/10/lib/amd64/libgcc_s.so.1
>>> ############ /usr/lib/64/libxml2.so.2 ###############
>>>         libstdc++.so.6 => /usr/gcc/10/lib/amd64/libstdc++.so.6
>>>         libgcc_s.so.1 => /usr/gcc/10/lib/amd64/libgcc_s.so.1
>>> ############ /usr/lib/64/librsvg-2.so.2 ###############
>>>         libstdc++.so.6 => /usr/gcc/10/lib/amd64/libstdc++.so.6
>>>         libgcc_s.so.1 => /usr/gcc/10/lib/amd64/libgcc_s.so.1
>>> ############ /usr/lib/64/libgiomm-2.4.so.1 ###############
>>>         libstdc++.so.6 => /usr/gcc/10/lib/amd64/libstdc++.so.6
>>>         libgcc_s.so.1 => /usr/gcc/10/lib/amd64/libgcc_s.so.1
>>> ############ /usr/lib/64/libglibmm-2.4.so.1 ###############
>>>         libstdc++.so.6 => /usr/gcc/10/lib/amd64/libstdc++.so.6
>>>         libgcc_s.so.1 => /usr/gcc/10/lib/amd64/libgcc_s.so.1
>>> ############ /usr/lib/64/libsigc-2.0.so.0 ###############
>>>         libstdc++.so.6 => /usr/gcc/10/lib/amd64/libstdc++.so.6
>>>         libgcc_s.so.1 => /usr/gcc/10/lib/amd64/libgcc_s.so.1
>>> ############ /usr/gcc/10/lib/amd64/libstdc++.so.6 ###############
>>>         libgcc_s.so.1 => /usr/gcc/10/lib/amd64/libgcc_s.so.1
>>> ############ /usr/lib/64/libatkmm-1.6.so.1 ###############
>>>         libstdc++.so.6 => /usr/gcc/10/lib/amd64/libstdc++.so.6
>>>         libgcc_s.so.1 => /usr/gcc/10/lib/amd64/libgcc_s.so.1
>>> ############ /usr/lib/64/libpangomm-1.4.so.1 ###############
>>>         libstdc++.so.6 => /usr/gcc/7/lib/amd64/libstdc++.so.6
>>>         libgcc_s.so.1 => /usr/gcc/7/lib/amd64/libgcc_s.so.1
>>>         libstdc++.so.6 => /usr/gcc/10/lib/amd64/libstdc++.so.6
>>>         libgcc_s.so.1 => /usr/gcc/10/lib/amd64/libgcc_s.so.1
>>> ############ /usr/lib/64/libcairomm-1.0.so.1 ###############
>>>         libstdc++.so.6 => /usr/gcc/10/lib/amd64/libstdc++.so.6
>>>         libgcc_s.so.1 => /usr/gcc/10/lib/amd64/libgcc_s.so.1
>>> ############ /usr/lib/64/libicuuc.so.68 ###############
>>>         libstdc++.so.6 => /usr/gcc/10/lib/amd64/libstdc++.so.6
>>>         libgcc_s.so.1 => /usr/gcc/10/lib/amd64/libgcc_s.so.1
>>> ############ /usr/lib/64/libcroco-0.6.so.3 ###############
>>>         libstdc++.so.6 => /usr/gcc/10/lib/amd64/libstdc++.so.6
>>>         libgcc_s.so.1 => /usr/gcc/10/lib/amd64/libgcc_s.so.1
>>>
>>>
>>>
>>> _______________________________________________
>>> openindiana-discuss mailing list
>>> openindiana-discuss at openindiana.org
>>> https://openindiana.org/mailman/listinfo/openindiana-discuss
>>
>> Hello!
>>
>> The linkage seems to be clean now:
>>
>> $ ldd `which mate-system-monitor` |grep 7
>> $ ldd `which mate-system-monitor` |grep 10
>>          libstdc++.so.6 => /usr/gcc/10/lib/amd64/libstdc++.so.6
>>          libgcc_s.so.1 => /usr/gcc/10/lib/amd64/libgcc_s.so.1
>>
>> $ mate-system-monitor
>> (<unknown>:4252): glibmm-CRITICAL **: 07:37:54.076:
>> unhandled exception (type Glib::Error) in signal handler:
>> domain: g-io-error-quark
>> code  : 0
>> what  : Unable to find default local file monitor type
>>
>> Segmentation Fault (core dumped)
>>
>> $ pstack core
>> core 'core' of 4252:    mate-system-monitor
>> --------------------- thread# 1 / lwp# 1 ---------------------
>>   000000000044b0a1 
>> _ZN10ProcmanApp15on_command_lineERKN4Glib6RefPtrIN3Gio22ApplicationCommandLineEEE 
>> () + 111
>>   00007fff7c789ab0 
>> _ZN3Gio17Application_Class21command_line_callbackEP13_GApplicationP24_GApplicationCommandLine 
>> () + 160
>>   00007fffac4ace5f _g_cclosure_marshal_INT__OBJECTv () + 6f
>>   00007fffac79aa08 _g_closure_invoke_va () + 188
>>   00007fffac7baf92 g_signal_emit_valist () + 332
>>   00007fffac7bc17d g_signal_emit () + 7d
>>   00007fffac509933 g_application_call_command_line () + a3
>>   00007fffac50bd71 g_application_real_local_command_line () + 211
>>   00007fff7c788722 
>> _ZN3Gio11Application24local_command_line_vfuncERPPcRi () + 52
>>   00007fff7c78939b 
>> _ZN3Gio17Application_Class33local_command_line_vfunc_callbackEP13_GApplicationPPPcPi 
>> () + fb
>>   00007fffac50bef3 g_application_run () + 133
>>   00000000004239f1 main () + 61
>>   0000000000422d37 _start_crt () + 87
>>   0000000000422c98 _start () + 18
>>
>> ...<snip>...
>
> That's exactly what I see, but libgdkmm-3 was not in the list of updated
> libraries posted. That one too loads both gcc 7 and 10. You can't see
> that from the ldd of mate-system-monitor, you have to hunt down the
> dependencies of every library loaded, as I did in my earlier post.
>
> _______________________________________________
> openindiana-discuss mailing list
> openindiana-discuss at openindiana.org
> https://openindiana.org/mailman/listinfo/openindiana-discuss

Hello!

libgdkmm-3 seems to be ok now.


$ find /usr/lib/amd64/ -iname "*.so.*" -exec ldd {} \;|grep "gcc/7"|sort -u
         libgcc_s.so.1 => /usr/gcc/7/lib/amd64/libgcc_s.so.1
         libssp.so.0 =>   /usr/gcc/7/lib/amd64/libssp.so.0
         libstdc++.so.6 => /usr/gcc/7/lib/amd64/libstdc++.so.6

$ find /usr/lib -iname libssp.so.0
/usr/lib/amd64/libssp.so.0
/usr/lib/libssp.so.0

$ find /usr/lib -iname libgcc_s.so.1
/usr/lib/libgcc_s.so.1
/usr/lib/amd64/libgcc_s.so.1

$ find /usr/lib -iname libstdc++.so.6
/usr/lib/libstdc++.so.6
/usr/lib/amd64/libstdc++.so.6

$ pkg search /usr/lib/amd64/libssp.so.0
INDEX      ACTION VALUE                     PACKAGE
path       link   usr/lib/amd64/libssp.so.0 
pkg:/system/library/gcc-11-compat-links at 11.3.0-2023.0.0.4
path       link   usr/lib/amd64/libssp.so.0 
pkg:/system/library/gcc-10-compat-links at 10.4.0-2023.0.0.3

$ pkg search /usr/lib/amd64/libgcc_s.so.1
INDEX      ACTION VALUE                       PACKAGE
path       link   usr/lib/amd64/libgcc_s.so.1 
pkg:/system/library/gcc-11-compat-links at 11.3.0-2023.0.0.4
path       link   usr/lib/amd64/libgcc_s.so.1 
pkg:/system/library/gcc-10-compat-links at 10.4.0-2023.0.0.3


$ pkg search /usr/lib/amd64/libstdc++.so.6
INDEX      ACTION VALUE                        PACKAGE
path       link   usr/lib/amd64/libstdc++.so.6 
pkg:/system/library/gcc-11-compat-links at 11.3.0-2023.0.0.4
path       link   usr/lib/amd64/libstdc++.so.6 
pkg:/system/library/gcc-10-compat-links at 10.4.0-2023.0.0.3





More information about the openindiana-discuss mailing list