All of lore.kernel.org
 help / color / mirror / Atom feed
* xen-access write protect Error
@ 2016-09-10 10:46 sepanta s
  2016-09-12  9:42 ` Razvan Cojocaru
  0 siblings, 1 reply; 3+ messages in thread
From: sepanta s @ 2016-09-10 10:46 UTC (permalink / raw)
  To: xen-devel@lists.xen.org


[-- Attachment #1.1: Type: text/plain, Size: 530 bytes --]

Hi,
I am using xen-access to write protect a lot of gfns of the machine, and
listen to each gfn which is going to be written. For each gfn that is
accessed for write operation I create a thread to copy its content after a
short period of time.
I have got the following event as I create a thread for each gfn which is
being written by the user:
error: Could not obtain handle on privileged command interface : Too many
open files
What could cause this as my xen-access program crashes and Segmentation
fault (core dumped) occurs.

[-- Attachment #1.2: Type: text/html, Size: 618 bytes --]

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: xen-access write protect Error
  2016-09-10 10:46 xen-access write protect Error sepanta s
@ 2016-09-12  9:42 ` Razvan Cojocaru
  2016-09-14  9:02   ` sepanta s
  0 siblings, 1 reply; 3+ messages in thread
From: Razvan Cojocaru @ 2016-09-12  9:42 UTC (permalink / raw)
  To: sepanta s, xen-devel@lists.xen.org

> I am using xen-access to write protect a lot of gfns of the machine, and
> listen to each gfn which is going to be written. For each gfn that is
> accessed for write operation I create a thread to copy its content after
> a short period of time.
> I have got the following event as I create a thread for each gfn which
> is being written by the user:
> error: Could not obtain handle on privileged command interface : Too
> many open files
> What could cause this as my xen-access program crashes and Segmentation
> fault (core dumped) occurs.

You're not able to open /dev/xen/privcmd (or /proc/xen/privcmd, see
tools/libs/call/linux.c - I assume you're using Linux), because you have
reached the limit of simultaneously open files that your operating
system will allow.

Try closing some of the handles / files that your application opens.
Even thread handles matter.


HTH,
Razvan

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: xen-access write protect Error
  2016-09-12  9:42 ` Razvan Cojocaru
@ 2016-09-14  9:02   ` sepanta s
  0 siblings, 0 replies; 3+ messages in thread
From: sepanta s @ 2016-09-14  9:02 UTC (permalink / raw)
  To: Razvan Cojocaru; +Cc: xen-devel@lists.xen.org


[-- Attachment #1.1: Type: text/plain, Size: 1208 bytes --]

Thanks.
I checked my code again to see where I open files but not closing them.
The error was due to opening the xc interface (xc_interface_open()) and not
closing it via xc_interface_close().


On Mon, Sep 12, 2016 at 2:12 PM, Razvan Cojocaru <rcojocaru@bitdefender.com>
wrote:

> > I am using xen-access to write protect a lot of gfns of the machine, and
> > listen to each gfn which is going to be written. For each gfn that is
> > accessed for write operation I create a thread to copy its content after
> > a short period of time.
> > I have got the following event as I create a thread for each gfn which
> > is being written by the user:
> > error: Could not obtain handle on privileged command interface : Too
> > many open files
> > What could cause this as my xen-access program crashes and Segmentation
> > fault (core dumped) occurs.
>
> You're not able to open /dev/xen/privcmd (or /proc/xen/privcmd, see
> tools/libs/call/linux.c - I assume you're using Linux), because you have
> reached the limit of simultaneously open files that your operating
> system will allow.
>
> Try closing some of the handles / files that your application opens.
> Even thread handles matter.
>
>
> HTH,
> Razvan
>

[-- Attachment #1.2: Type: text/html, Size: 1675 bytes --]

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-14  9:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-10 10:46 xen-access write protect Error sepanta s
2016-09-12  9:42 ` Razvan Cojocaru
2016-09-14  9:02   ` sepanta s

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.