[tickets] [opensaf:tickets] Re: #1825 MDS: When saImmOmInitialize was invoked, MDS sent ‘pid = 0’ in MDS_CALLBACK_RECEIVE_INFO.

2016-05-25 Thread Hung Nguyen
This one
~~~
if ((info != NULL) && (kill(info->pid, 0) == -1) && (errno != EPERM))
~~~


---

** [tickets:#1825] MDS: When saImmOmInitialize was invoked, MDS sent ‘pid = 0’ 
in MDS_CALLBACK_RECEIVE_INFO.**

**Status:** assigned
**Milestone:** 4.7.2
**Created:** Fri May 13, 2016 12:34 PM UTC by Rafael
**Last Updated:** Thu May 26, 2016 03:20 AM UTC
**Owner:** A V Mahesh (AVM)
**Attachments:**

- 
[sc2_mds.log](https://sourceforge.net/p/opensaf/tickets/1825/attachment/sc2_mds.log)
 (2.6 MB; text/x-log)


This happens only some of the time. 

First this is called from an application:

saImmOmInitialize(immHandle, NULL, )

Then the system log shows this error:

May 13 02:31:53 sc2 osafimmnd[6042]: WA immnd_evt_proc_imm_init: PID 0 
(7150) for 2020fb1d13cb8, MDS problem?
 May 13 02:31:53 sc2 osafimmnd[6042]: WA immnd_evt_proc_imm_init: PID 0 
(7150) for 2020fb1d13cb8, MDS problem?
 May 13 02:31:55 sc2 osafimmnd[6042]: NO Ccb 176 COMMITTED (LDE)
 May 13 02:31:55 sc2 osafimmnd[6042]: WA immnd_evt_proc_imm_init: PID 0 
(7150) for 2020fb1d13cb8, MDS problem?
 May 13 02:31:55 sc2 osafimmnd[6042]: WA immnd_evt_proc_imm_init: PID 0 
(7150) for 2020fb1d13cb8, MDS problem?


---

Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.--
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j___
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets


[tickets] [opensaf:tickets] Re: #1825 MDS: When saImmOmInitialize was invoked, MDS sent ‘pid = 0’ in MDS_CALLBACK_RECEIVE_INFO.

2016-05-25 Thread Hung Nguyen
Hi Mahesh,
Allowing EPERM fixes the problem. Please provide the official patch.
Thanks,


---

** [tickets:#1825] MDS: When saImmOmInitialize was invoked, MDS sent ‘pid = 0’ 
in MDS_CALLBACK_RECEIVE_INFO.**

**Status:** assigned
**Milestone:** 4.7.2
**Created:** Fri May 13, 2016 12:34 PM UTC by Rafael
**Last Updated:** Tue May 24, 2016 09:54 AM UTC
**Owner:** A V Mahesh (AVM)
**Attachments:**

- 
[sc2_mds.log](https://sourceforge.net/p/opensaf/tickets/1825/attachment/sc2_mds.log)
 (2.6 MB; text/x-log)


This happens only some of the time. 

First this is called from an application:

saImmOmInitialize(immHandle, NULL, )

Then the system log shows this error:

May 13 02:31:53 sc2 osafimmnd[6042]: WA immnd_evt_proc_imm_init: PID 0 
(7150) for 2020fb1d13cb8, MDS problem?
 May 13 02:31:53 sc2 osafimmnd[6042]: WA immnd_evt_proc_imm_init: PID 0 
(7150) for 2020fb1d13cb8, MDS problem?
 May 13 02:31:55 sc2 osafimmnd[6042]: NO Ccb 176 COMMITTED (LDE)
 May 13 02:31:55 sc2 osafimmnd[6042]: WA immnd_evt_proc_imm_init: PID 0 
(7150) for 2020fb1d13cb8, MDS problem?
 May 13 02:31:55 sc2 osafimmnd[6042]: WA immnd_evt_proc_imm_init: PID 0 
(7150) for 2020fb1d13cb8, MDS problem?


---

Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.--
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j___
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets


[tickets] [opensaf:tickets] Re: #1825 MDS: When saImmOmInitialize was invoked, MDS sent ‘pid = 0’ in MDS_CALLBACK_RECEIVE_INFO.

2016-05-24 Thread Hung Nguyen
Yes, opensaf is run as non root and osafimmnd doesn't have root privilege. We 
observed this on Ubuntu and OpenSUSE.

>if ((info != NULL) && ((kill(info->pid, 0) == -1) || errno == EPERM)

Did you mean:
~~~
if ((info != NULL) && (kill(info->pid, 0) == -1) && (errno != EPERM))
~~~


---

** [tickets:#1825] MDS: When saImmOmInitialize was invoked, MDS sent ‘pid = 0’ 
in MDS_CALLBACK_RECEIVE_INFO.**

**Status:** assigned
**Milestone:** 4.7.2
**Created:** Fri May 13, 2016 12:34 PM UTC by Rafael
**Last Updated:** Tue May 24, 2016 09:54 AM UTC
**Owner:** A V Mahesh (AVM)
**Attachments:**

- 
[sc2_mds.log](https://sourceforge.net/p/opensaf/tickets/1825/attachment/sc2_mds.log)
 (2.6 MB; text/x-log)


This happens only some of the time. 

First this is called from an application:

saImmOmInitialize(immHandle, NULL, )

Then the system log shows this error:

May 13 02:31:53 sc2 osafimmnd[6042]: WA immnd_evt_proc_imm_init: PID 0 
(7150) for 2020fb1d13cb8, MDS problem?
 May 13 02:31:53 sc2 osafimmnd[6042]: WA immnd_evt_proc_imm_init: PID 0 
(7150) for 2020fb1d13cb8, MDS problem?
 May 13 02:31:55 sc2 osafimmnd[6042]: NO Ccb 176 COMMITTED (LDE)
 May 13 02:31:55 sc2 osafimmnd[6042]: WA immnd_evt_proc_imm_init: PID 0 
(7150) for 2020fb1d13cb8, MDS problem?
 May 13 02:31:55 sc2 osafimmnd[6042]: WA immnd_evt_proc_imm_init: PID 0 
(7150) for 2020fb1d13cb8, MDS problem?


---

Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.--
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j___
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets


[tickets] [opensaf:tickets] Re: #1825 MDS: When saImmOmInitialize was invoked, MDS sent ‘pid = 0’ in MDS_CALLBACK_RECEIVE_INFO.

2016-05-24 Thread Hung Nguyen
Maybe kill() failed with this errno

- EPERM You do not have the privilege to send a signal to the process or any of 
the processes in the process group named by pid.

When kill() failed with that errno, I think the process info should not be 
cleared.


---

** [tickets:#1825] MDS: When saImmOmInitialize was invoked, MDS sent ‘pid = 0’ 
in MDS_CALLBACK_RECEIVE_INFO.**

**Status:** assigned
**Milestone:** 4.7.2
**Created:** Fri May 13, 2016 12:34 PM UTC by Rafael
**Last Updated:** Tue May 24, 2016 07:45 AM UTC
**Owner:** A V Mahesh (AVM)
**Attachments:**

- 
[sc2_mds.log](https://sourceforge.net/p/opensaf/tickets/1825/attachment/sc2_mds.log)
 (2.6 MB; text/x-log)


This happens only some of the time. 

First this is called from an application:

saImmOmInitialize(immHandle, NULL, )

Then the system log shows this error:

May 13 02:31:53 sc2 osafimmnd[6042]: WA immnd_evt_proc_imm_init: PID 0 
(7150) for 2020fb1d13cb8, MDS problem?
 May 13 02:31:53 sc2 osafimmnd[6042]: WA immnd_evt_proc_imm_init: PID 0 
(7150) for 2020fb1d13cb8, MDS problem?
 May 13 02:31:55 sc2 osafimmnd[6042]: NO Ccb 176 COMMITTED (LDE)
 May 13 02:31:55 sc2 osafimmnd[6042]: WA immnd_evt_proc_imm_init: PID 0 
(7150) for 2020fb1d13cb8, MDS problem?
 May 13 02:31:55 sc2 osafimmnd[6042]: WA immnd_evt_proc_imm_init: PID 0 
(7150) for 2020fb1d13cb8, MDS problem?


---

Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.--
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j___
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets


[tickets] [opensaf:tickets] Re: #1825 MDS: When saImmOmInitialize was invoked, MDS sent ‘pid = 0’ in MDS_CALLBACK_RECEIVE_INFO.

2016-05-23 Thread Hung Nguyen
I meant:

* the TIPC_PUBLISHED event and TIPC_WITHDRAWN event are from Dsock
* the MDS messages are from BSRsock
* and the auth-server in running in a separate thread (handling 
MDS_REGISTER_REQ/MDS_UNREGISTER_REQ messages)

So we can't control the order of up/down events and the messages that will be 
received on IMM server.

In IMM library/agent, here's what we do when finializing-initializing handles:

1. Send IMMND_EVT_A2ND_IMM_FINALIZE
1. mds_auth_server_disconnect()
1. Uninstall MDS (NCSMDS_TYPE == MDS_UNINSTALL)
1. Install MDS (NCSMDS_TYPE == MDS_INSTALL)
1. mds_auth_server_connect()
1. Send IMMND_EVT_A2ND_IMM_INIT

So normally, on IMM server, the events/messages will be received in the 
following order:

1. Receive IMMND_EVT_A2ND_IMM_FINALIZE
1. **MDS_UNREGISTER_REQ messages**
1. **NCSMDS_DOWN event (TIPC_WITHDRAWN)**
1. **NCSMDS_UP event (TIPC_PUBLISHED)**
1. **MDS_REGISTER_REQ messages**
1. Receive IMMND_EVT_A2ND_IMM_INIT

When receiving MDS_UNREGISTER_REQ messages, the process info is removed from 
process_info_db. Then when the TIPC_WITHDRAWN event comes, mds_mcm_svc_down() 
will check and see that process info is already cleared, timer is not started.

But sometimes we receive in order like this:

1. Receive IMMND_EVT_A2ND_IMM_FINALIZE
1. **MDS_REGISTER_REQ messages**
1. **MDS_UNREGISTER_REQ messages**
1. Receive IMMND_EVT_A2ND_IMM_INIT
1. **NCSMDS_DOWN event (TIPC_WITHDRAWN)**
1. **NCSMDS_UP event (TIPC_PUBLISHED)**

When receiving MDS_UNREGISTER_REQ messages, the process info is removed from 
process_info_db. Then MDS_REGISTER_REQ comes right after that and the process 
info is added to process_info_db. Then when the TIPC_WITHDRAWN event comes, 
mds_mcm_svc_down() will check and see that process info is still there, timer 
is started. After 10 seconds, the process info is cleared.

I think the process info should not be cleared in this case (by clearing the 
timer when receving TIPC_PUBLISHED event).




---

** [tickets:#1825] MDS: When saImmOmInitialize was invoked, MDS sent ‘pid = 0’ 
in MDS_CALLBACK_RECEIVE_INFO.**

**Status:** unassigned
**Milestone:** 4.7.2
**Created:** Fri May 13, 2016 12:34 PM UTC by Rafael
**Last Updated:** Mon May 23, 2016 03:58 AM UTC
**Owner:** nobody
**Attachments:**

- 
[sc2_mds.log](https://sourceforge.net/p/opensaf/tickets/1825/attachment/sc2_mds.log)
 (2.6 MB; text/x-log)


This happens only some of the time. 

First this is called from an application:

saImmOmInitialize(immHandle, NULL, )

Then the system log shows this error:

May 13 02:31:53 sc2 osafimmnd[6042]: WA immnd_evt_proc_imm_init: PID 0 
(7150) for 2020fb1d13cb8, MDS problem?
 May 13 02:31:53 sc2 osafimmnd[6042]: WA immnd_evt_proc_imm_init: PID 0 
(7150) for 2020fb1d13cb8, MDS problem?
 May 13 02:31:55 sc2 osafimmnd[6042]: NO Ccb 176 COMMITTED (LDE)
 May 13 02:31:55 sc2 osafimmnd[6042]: WA immnd_evt_proc_imm_init: PID 0 
(7150) for 2020fb1d13cb8, MDS problem?
 May 13 02:31:55 sc2 osafimmnd[6042]: WA immnd_evt_proc_imm_init: PID 0 
(7150) for 2020fb1d13cb8, MDS problem?


---

Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.--
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j___
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets


[tickets] [opensaf:tickets] Re: #1825 MDS: When saImmOmInitialize was invoked, MDS sent ‘pid = 0’ in MDS_CALLBACK_RECEIVE_INFO.

2016-05-18 Thread A V Mahesh (AVM)
Hi Hung Nguyen,

I will check and get back to you.

-AVM

On 5/18/2016 2:37 PM, Hung Nguyen wrote:
>
> Hi Mahesh,
>
> Here's the immnd trace and mds log for this problem.
>
> 11:26:21.778367  osafimmnd[5238]  NOTIFY   |MDTM:  svc  down  event  for  
> svc_id  =  IMMA_OM(26),  subscri.  by  svc_id  =  IMMND(25)  pwe_id=1  Adest  
> =  
> 11:26:21.778474  osafimmnd[5238]  NOTIFY   |MDTM:  svc  up  event  for  
> svc_id  =  IMMA_OM(26),  subscri.  by  svc_id  =  IMMND(25)  pwe_id=1  Adest  
> =  
> 11:26:21.779135  osafimmnd  [5238:immsv_evt.c:5473]  T8  Received:  
> IMMND_EVT_MDS_INFO  (1)  from  0
> 11:26:21.779147  osafimmnd  [5238:immnd_evt.c:10368]  T2  IMMA  DOWN  EVENT
> 11:26:21.779225  osafimmnd  [5238:immsv_evt.c:5473]  T8  Received:  
> IMMND_EVT_MDS_INFO  (1)  from  0
> 11:26:21.779237  osafimmnd  [5238:immnd_evt.c:10443]  T2  IMMA  UP  EVENT
>
> IMM received an NCSMDS_DOWN event and an NCSMDS_UP event right after that.
> There's no message from client, so the client didn't call 
> ImmOmFinalize()/ImmOmInitialize().
>
> It seemed that the connection is not stable/flickering or something 
> like that (?)
> Dsock is a tipc socket, maybe this is a problem with tipc (?)
>
> When there's a "withdrawn event", MDS starts a timer to remove the 
> process info after 10 seconds.
> That's the reason why IMM can't read the PID.
>
> 11:26:31.878622  osafimmnd  [5238:mds_dt_common.c:0862]  TR  TIMEOUT,  
> deleting  entry  for  2010ffc93cf53,  pid:5725
> 11:26:31.878655  osafimmnd  [5238:mds_c_db.c:2527]  >>  mds_process_info_del: 
>  dest:2010ffc93cf53,  pid:5725,  svc:26
>
> The question is: should/does MDS clear the timer when it receives 
> "published event" from the same adest+svc_id ?
>
> The problem can be solved if the timer is cleared.
>
> Attachments:
>
>   * logs.tgz
> 
> 
> (5.5 MB; application/x-compressed)
>
> 
>
> *[tickets:#1825]  
> MDS: When saImmOmInitialize was invoked, MDS sent ‘pid = 0’ in 
> MDS_CALLBACK_RECEIVE_INFO.*
>
> *Status:* unassigned
> *Milestone:* 4.7.2
> *Created:* Fri May 13, 2016 12:34 PM UTC by Rafael
> *Last Updated:* Tue May 17, 2016 11:44 AM UTC
> *Owner:* nobody
> *Attachments:*
>
>   * sc2_mds.log
> 
> (2.6 MB; text/x-log)
>
> This happens only some of the time.
>
> First this is called from an application:
>
> saImmOmInitialize(immHandle, NULL, )
>
> Then the system log shows this error:
>
> May 13 02:31:53 sc2 osafimmnd[6042]: WA immnd_evt_proc_imm_init: PID 0 (7150) 
> for 2020fb1d13cb8, MDS problem?
>   May 13 02:31:53 sc2 osafimmnd[6042]: WA immnd_evt_proc_imm_init: PID 0 
> (7150) for 2020fb1d13cb8, MDS problem?
>   May 13 02:31:55 sc2 osafimmnd[6042]: NO Ccb 176 COMMITTED (LDE)
>   May 13 02:31:55 sc2 osafimmnd[6042]: WA immnd_evt_proc_imm_init: PID 0 
> (7150) for 2020fb1d13cb8, MDS problem?
>   May 13 02:31:55 sc2 osafimmnd[6042]: WA immnd_evt_proc_imm_init: PID 0 
> (7150) for 2020fb1d13cb8, MDS problem?
> 
>
> Sent from sourceforge.net because you indicated interest in 
> https://sourceforge.net/p/opensaf/tickets/1825/
>
> To unsubscribe from further messages, please visit 
> https://sourceforge.net/auth/subscriptions/
>




---

** [tickets:#1825] MDS: When saImmOmInitialize was invoked, MDS sent ‘pid = 0’ 
in MDS_CALLBACK_RECEIVE_INFO.**

**Status:** unassigned
**Milestone:** 4.7.2
**Created:** Fri May 13, 2016 12:34 PM UTC by Rafael
**Last Updated:** Wed May 18, 2016 09:07 AM UTC
**Owner:** nobody
**Attachments:**

- 
[sc2_mds.log](https://sourceforge.net/p/opensaf/tickets/1825/attachment/sc2_mds.log)
 (2.6 MB; text/x-log)


This happens only some of the time. 

First this is called from an application:

saImmOmInitialize(immHandle, NULL, )

Then the system log shows this error:

May 13 02:31:53 sc2 osafimmnd[6042]: WA immnd_evt_proc_imm_init: PID 0 
(7150) for 2020fb1d13cb8, MDS problem?
 May 13 02:31:53 sc2 osafimmnd[6042]: WA immnd_evt_proc_imm_init: PID 0 
(7150) for 2020fb1d13cb8, MDS problem?
 May 13 02:31:55 sc2 osafimmnd[6042]: NO Ccb 176 COMMITTED (LDE)
 May 13 02:31:55 sc2 osafimmnd[6042]: WA immnd_evt_proc_imm_init: PID 0 
(7150) for 2020fb1d13cb8, MDS problem?
 May 13 02:31:55 sc2 osafimmnd[6042]: WA immnd_evt_proc_imm_init: PID 0 
(7150) for 2020fb1d13cb8, MDS problem?


---

Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from