Solaris8 and 9 (possibly 7) /dev/poll driver bug report.

Hello,
I'd like to report a bug in the solaris 8 and 9 /dev/poll driver (poll(7d)).
As i do not have a support account with sun or anything like that, there
seems to be no other way to do that here (which is of course a very sad
thing).
Bug details:
The /dev/poll device provides an ioctl-request (DP_ISPOLLED) for checking
if a particular filedescriptor is currently in the set of monitored
filedescriptors for that particular /dev/poll fd set (open /dev/poll fd).
A quote from the documentation of the poll(7d) manual page taken from
Solaris9:
"DP_ISPOLLED ioctl allows you to query if a file descriptor is already in
the monitored set represented by fd. The fd field of the pollfd structure
indicates the file descriptor of interest. The DP_ISPOLLED ioctl returns 1
if the file descriptor is in the set. The events field contains the
currently polled events. The revents field contains 0. The ioctl returns 0
if the file descriptor is not in the set. The pollfd structure pointed by
pfd is not modified. The ioctl returns a -1 if the call fails."
It says that when you query for an filedescriptor which is currently being
monitored in the set, that it would return 1, and change the events field of
the pollfd structure to the events it's currently monitoring that fd for.
The revents field would be set to zero.
However the only thing which actually happens here, is that FD_ISPOLLED
returns 1 when the fd is in the set and 0 if not. When the fd is in the
set, when FD_ISPOLLED returns 1, the events field remains unmodified, but
the revents field gets changed.
A small sample code to illustrate:
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/devpoll.h>
main() {
struct pollfd a;
int dp_fd = open("/dev/poll", O_WRONLY);
a.fd = 0; /* stdin */
a.events = POLLIN; /* we monitor for readability, POLLIN=1 */
a.revents = 0;
write(dp_fd, &a, sizeof(a));
a.fd = 0;
a.events = 34; /* filled in with bogus number to show malfunctioning */
a.revents = 0;
printf("DP_ISPOLLED returns: %d\n", ioctl(dp_fd, DP_ISPOLLED, &a));
printf("a.fd=%d, a.events=%hd, a.revents=%hd\n", a.fd, a.events,
a.revents);
According to the documentation of /dev/poll and namely DP_ISPOLLED this
program is supposed to print the following:
DP_ISPOLLED returns: 1
a.fd=0, a.events=1, a.revents=0
However it prints the following:
DP_ISPOLLED returns: 1
a.fd=0, a.events=34, a.revents=1
You can take any number instead of '34' and it will simply remain untouched
after the DP_ISPOLLED ioctl-request.
I hope it's clear now that the solaris8 and solaris9 (and probably solaris7
with /dev/poll patch too) DP_ISPOLLED implementation is broken.
This bug is also easily illustrated by looking at the solaris8 kernel sourcecode:
<snippet osnet_volume/usr/src/uts/common/io/devpoll.c:dpioctl()>
case DP_ISPOLLED:
pollfd_t pollfd;
polldat_t *pdp;
if (pollfd.fd < 0) {
mutex_exit(&pcp->pc_lock);
break;
pdp = pcache_lookup_fd(pcp, pollfd.fd);
if ((pdp != NULL) && (pdp->pd_fd == pollfd.fd) &&
(pdp->pd_fp != NULL)) {
pollfd.revents = pdp->pd_events;
if (copyout(&pollfd, (caddr_t)arg,
sizeof(pollfd_t))) {
mutex_exit(&pcp->pc_lock);
DP_REFRELE(dpep);
return (set_errno(EFAULT));
*rvalp = 1;
</snippet>
its' clearly visible that the code writes the current monitored events to
the revents field:
'pollfd.revents = pdp->pd_events;'
and that it doesnt set revents to zero.
It's funny to see that this has been like this since Solaris8 (possibly 7). That means nobody ever used DP_ISPOLLED that way or people were simply to lazy to file a bug report.
Another funny thing related to this. is that Hewlett-Packard did seem to know about this. Since HP-UX11i version 1.6 they also support /dev/poll. From their manual page i ll quote some sentences from their WARNING session:
"The ioctl(DP_ISPOLLED) system call also returns its result in the revents member of the pollfd structure, in order to be compatible with the implementation of the /dev/poll driver by some other vendors."
Hopefully this will get fixed.
I also like to reexpress my very negative feelings towards the fact that you're not able to file bug reports when you do not have a support contract. Ridiculous.
Thanks,
bighawk

Have I mentioned how much i love my playbook now Great job on os 2.0

Similar Messages

  • How and where can I submit a bug report to Nokia ?

    How and where can I submit a bug report to Nokia ? I haven't found any Nokia's webpage where it is explained.

    wait for the next nokia beta test program (they usually annouce it on this forum) and enrol
    then you will have access to the developers to report bugs
    the last beta test finished end of November.. so it will be a while b4 the next beta test
    cheers
    Nokia N95 8GB, 6234, 6101, N-Gage Classic, 8250, 3350, 3315

  • RH detaches template from topics when editing. RH7, RH6 and possibly RH5 too

    Just in case anybody has had this problem that I have lived with for years.
    I've reported it as a bug.
    Concise problem statement:
    In many Help projects, I confine the contents of each topic to a table of about 750px wide, so that the appearance looks reasonable on some of these modern very large, wide-screen monitors. (This avoids having a line of text nearly two feet long!)
    It also keeps the positioning of floating images in their correct place, and maintains the good appearance of the topis.
    The problem is that, when editing these topics and saving them, they often detach the Template. This also often happens if I go into Topic Properties to change the topic name and file name.
    A message box pops up, asking me if I want to make template changes to just this topic, or to all topics.
    You have to be VERY careful to select 'Just this topic', and then re-attach the template again afterwards. If you get it wrong and select 'All Topics', then on earlier versions of RH it would strip the template off ALL topics and then DELETE THE TEMPLATE!
    Fortunately, I haven't made this mistake on version 7, but I think the risk is still there.
    Steps to reproduce bug:
    1. Create a new topic template and insert a table (mine have invisible borders) of, say, 750px wide.
    2. Save the template.
    3. Create several topics with a reasonable amount of content (copy and paste something from a Word doc, for example.)
    4. Try editing a few topics.
    5. Or try changing the Topic Properties Topic Title and/or File Name and click OK a few times.
    Results: It shouldn't be long before it starts to misbehave.
    Expected results: The template should NOT be detached.
    Note: I have had this problem on every Help Project since I started using RH years ago. But it wasn't till I built one recently that didn't use a table for the content, that I discovered that it was then stable because ther was no table for the content.
    Hope this is helpful.
    Philip Tory

    Hi Phillip
    I had a look at your video. RoboHelp is  not losing the connection to the template. What is happening (at least  according to the video you presented) is that for some reason it is  sensing a change has been made to the Header or Footer. Because the  topic is associated with the Template (or Master Page in RoboHelp 8) it  is asking you how it should proceed. When you choose the option to apply  the modification to the topic, you are instructing RoboHelp to break  the connection to the template.
    What you need to be  investigating is exactly why it is sensing you have made a change to the  Header or Footer. Once you solve that mystery you should not encounter  the message that causes you to sever the connection between the  Template/Master Page and the Topic.
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp  Wish Form/Bug Reporting Form
    Begin  learning RoboHelp HTML 7 or 8 moments from now - $24.95!
    Adobe Certified RoboHelp HTML  Training
    SorcererStone Blog
    RoboHelp eBooks

  • Bug report: Safari 5 fails to handle 8192 bit RSA certificates

    Running Safari 5.1.7 on OS X 10.6.8 -- I haven't confirmed for the version of Safari running on 10.7 -- and trying to access a site over https that uses an 8192 bits large RSA cert causes Safari to bug out. It can't display the certificate details correctly, giving just a garbled text output, and even a buggy interface dialog, and manually trying to accept the certificate to get the website to load causes Safari to run in an endless loop, displaying the certificate warning anew, over and over, making it impossible to load the page. The exact same certificate details put in a 4096 bit cert works just fine.
    Could anyone in the core dev team take a look at this? The number of sites making use of 8192 bit large certs is growing, and Safari is the only browser out there that can't handle it.
    add.: it seems the problem sits at a more fundamental level than in Safari, possibly in some underlying framework - apparently several other applications in OS X fails with handling an RSA cert of 8192 bits size, as mentioned in this thread: https://discussions.apple.com/message/11728527
    Possibly related: https://discussions.apple.com/message/3650856

    Could anyone in the core dev team take a look at this? The number of sites making use of 8192 bit large certs is growing, and Safari is the only browser out there that can't handle it.
    It might be worth registering (for free) as an Apple Developer:
    http://developer.apple.com/programs/register/
    ... and then you can use the Bug Reporter to submit trackable bug reports:
    http://developer.apple.com/bugreporter/

  • Bug Report Safari / Taskbar follows into Safari

    Hi,
    I hope my description is correct, respectively understandable.
    When I start the Safari, the Taskbar above follows with kind of a wipe-effekt into the Safari and disapears then. This happens only when I start the Safari, not when I switch back to it when already open. Of course this is no big issue but a ugly one, even it's only for a second.
    The picture above shows it perfectly and I hope some devs will read this to consider it in the next update.
    Cheers,
    Roland

    Could anyone in the core dev team take a look at this? The number of sites making use of 8192 bit large certs is growing, and Safari is the only browser out there that can't handle it.
    It might be worth registering (for free) as an Apple Developer:
    http://developer.apple.com/programs/register/
    ... and then you can use the Bug Reporter to submit trackable bug reports:
    http://developer.apple.com/bugreporter/

  • Filing Bug Reports With Apple?

    I SWEAR Apple is getting more and more like Microsoft.
    Can some one PLEASE tell me how to file a BUG REPORT to Apple on the 10.5.3 update? I am getting graphic driver problems again like they were on 10.5.0 and 10.5.1.
    Contacting Apple with a direct bug report seems near impossible and the website is of little help in finding this information. I am outside of Apple Care support.
    10.5.3 graphic drivers are broken again on a "Dual 2HHz Power PC G5" with the following Graphics Card:
    GeForce FX 5200:
    Chipset Model: GeForce FX 5200
    Type: Display
    Bus: AGP
    Slot: SLOT-1
    VRAM (Total): 64 MB
    Vendor: NVIDIA (0x10de)
    Device ID: 0x0321
    Revision ID: 0x00a2
    ROM Revision: 2060
    Bringing up the Save Dialog for e-mail attachments for Apple Mail 3.3 (924) cause the background to totally go wacko but it is restored when the save dialog disappears.
    Message was edited by: Confused7766

    Register for a free online developer account with your AppleID you used to sign on this board. http://developer.apple.com/
    Then go to http://bugreporter.apple.com/ and login there to file your bug report. Note, any discoveries there you are under a non-disclosure agreement.

  • Bug report follow-up

    is there a way to follow-up on a bug report that i submitted?  i have the bug number, but would like to see if the report was understood, filled out properly and determine the status of the bug report.
    thanks,
    doug

    They comment on bugs if actions were taken. Otherwise - don't expect any feedback.

  • Help! Flash bug reports returned as "undeliverable"

    I've been attempting to submit a bug report regarding Flash Professional CS6 and CS5 on Adobe's official bug reporting page:
    https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
    I've made three attempts in the past 4 days, and each one has been returned to me as "undeliverable":
    Delivery has failed to these recipients or distribution lists:
    [email protected]
    The recipient's e-mail address was not found in the recipient's e-mail system...
    I've successfully submitted reports regarding Fireworks and Dreamweaver, so the error is not on my end. Does anyone know what's going on here?
    As there is no "Flash Professional" option in the list of product names, I've been choosing "Flash Authoring", which I've seen mentioned elsewhere as a suitable choice for general issues with Flash Professional.

    Originally, I posted this in the Flash Pro forum... but after a day, I moved it here as I had received no response and it's not a Flash product question, per se. (Also, I'd noticed that the top participants on that forum were all Community Members, whereas this forum includes an Adobe Employee as its top participant and features a number of employee/admin responses.)
    I'm not aware of how to reach out to the Flash product managers... Any advice on that subject would be appreciated.
    Thanks!

  • Possible AMT8 midi driver bug.....

    Possible AMT8 midi driver bug.....
    Hi All,
    I have a slave computer hooked up to my AMT8 ports 6 and 7
    When I launch my project from Logic 7 it plays / triggers.....When I launch same project in Logic 8 it doesn't play / trigger...
    OF NOTE: I also have 2 other slave computers that are hooked up to AMT8 ports 4 and 8.....those trigger just fine...
    thoughts?
    SvK

    Steven von Kampen wrote:
    Could some kind soul please confirm that Logic8 does not send midi to ports 6 and 7 .....
    Hi Steven,
    My setup is identical to iS's. Unitor8 with AMT8 daisychained.
    I have port 6 I/O of the U8 going to a CM Motormix. Working great.
    I have port 14 I/O (port 6 of the AMT8) going to my old G3 Soundiver-Kurzweil K2500 rig. Also working great.
    Ports 7 and 15 at the moment aren't connected to anything, but I can test them later if you like. The LEDs for those ports are lighting when I send MIDI to them from L8 though.
    Note that when I installed Logic 8, there's an option to install the Unitor8 family drivers. I checked that. (Just in case). Try running the installer again with everything unchecked except that. Maybe there's a new version?
    Sorry I can't confirm your bug!

  • I am replacing my existing SATA hard drive to a Solid State hard drive and want to image the drive, is this possible?

    I am replacing my existing 320 GB SATA hard drive that clicks and makes weird noises to a Solid State hard drive and want to image the drive, is this possible?  I then want to replace the DVD with a secondary large drive for storage.
    So I am looking for any "gotchas" that I may be unaware of.
    Thanks!

    Put the Old drive in an external notebook drive enclosure. Install the SSD in your computer. Boot from your Old drive's Recovery HD:
    Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Clone Lion/Mountain Lion using Restore Option of Disk Utility
         1. Select Disk Utility from the main menu then press the Continue
             button.
         2. Select the destination volume from the left side list.
         3. Click on the Restore tab in the DU main window.
         4. Select the destination volume from the left side list and drag it
             to the Destination entry field.
         5. Select the source volume from the left side list and drag it to
             the Source entry field.
         6. Double-check you got it right, then click on the Restore button.
    Destination means the New SSD. Source means the external Old hard drive.
    Set the new Startup Disk to the SSD and restart the computer.
    This process clones both your old OS X volume and the Recovery HD volume to the SSD. You can use a similar process to clone the SSD to the new hard drive you will install.

  • Solaris 10 /dev/poll bug

    Solaris 10, at least on my T2000, seems to give me an EINVAL from the DP_POLL ioctl in a case where it shouldn't. The below example code should clarify:
    #include <stdio.h>
    #include <stdlib.h>
    #include <sys/types.h>
    #include <fcntl.h>
    #include <errno.h>
    #include <limits.h>
    #include <sys/resource.h>
    #include <sys/devpoll.h>
    This program demonstrates what seems to be a bug in the /dev/poll interface
    on Solaris 10 on our T2000. The man page says:
    EINVAL The request or arg parameter is not valid
    for this device, or field of the dvpoll
    struct pointed by arg is not valid (for
    example, dp_nfds is greater than
    {OPEN_MAX}).
    But in this case, we get EINVAL even though dp_nfds is not greater than
    OPEN_MAX.
    void fatal(const char *f)
    fprintf(stderr, "Unable to show problem: %s\n", f);
    exit(1);
    int main(void)
    struct rlimit r;
    struct pollfd pfd[256];
    struct dvpoll dp;
    int i;
    if(getrlimit(RLIMIT_NOFILE, &r)!=0) fatal("unable to get file limit");
    if(r.rlim_cur!=256) fatal("set fd limit to 256");
    if(OPEN_MAX!=256) fatal("OPEN_MAX must be 256");
    i=open("/dev/poll", O_RDWR);
    if(i<0) fatal("unable to open /dev/poll");
    dp.dp_timeout=0;
    dp.dp_nfds=256; /* Changing this to 255 fixes the problem */
    dp.dp_fds=pfd;
    if(ioctl(i, DP_POLL, &dp)==0) fatal("it does not appear on this system");
    printf("errno=%d - Why?\n", errno);
    Any ideas?

    I ran into the same problem. /dev/poll is too smart for its own good here. You can't monitor your /dev/poll file descriptor using /dev/poll, so the actual maximum number of file descriptors you can monitor is OPEN_MAX - 1. Solaris enforces that limit.
    This breaks other code out there too, e.g. the libevent library. Annoying even though it's arguably technically correct.

  • Two possibly unrelated questions - Hard Drive and something else.

    Sorry I only have symptoms not specifics at this point. I have an intel core duo mac mini, running 10.5.6, with 4 gigs of ram. I have a couple of issues that may be unrelated: A possible Hard drive issue and another strange issue. I don't know if there are related but since I may have to go through the hassle of cracking open my mini I thought I would ask.
    First issue when I stream video over the internet sometimes and only sometimes my machine will suddenly restart, no shutdown, no prompts, just instantaneously restart, other times it will stream hours of video without issue. This issue has plagued me since 10.4 and all subsequent upgrades.
    Second issue is what I believe is a hard drive failure, but I'm not sure and I don't want to buy/replace it if that's not the issue. I updated to 10.5.6 a few months ago and was running with no issues although lately it has been getting slower. Last week my parents came over to watch "24" online so after working on my computer all morning I restarted my machine thinking it would stream better, upon restart it would get to the large apple with the spinning graphic and hang up, then about after a minute in it would simply power off. Confused I restarted with the same results. I tried this probably 10 times with the same result. Checked all the cables, etc. nothing. so next I booted into the Leopard Installer and ran disk utility. At first the hard drive didn't show up in the left column so I quit disk utility and launched startup disk, again no hard drive, then I re-launched disk utility - now it showed up. I ran repair disk since repair permissions was greyyed out. It came back with errors saying disk couldn't be repaired. Sorry the only error message I recall is a damaged catalog B-tree. So I restarted and for the first time in 10 hours my machine actually restarted and everything came back. From here I backed up everything important. Since then it has restarted 3 times will no issues, other than running a little slower than usual. So last night I ran Disk Warrior and receive the error message. " Could not rebuild due to a disk malfunction. A disk malfunction is a failure of or damage to any mechanical component of the disk device or any component connected to it. Since I had disk warrior in there I checked the hardware test option where it checks the S.M.A.R.T. something or another, sorry for the choice of words I've never done that, and it returned saying the drive was fine. So here I am a bit confused if it's the hard drive or another issue any ideas.

    Hi daredman01-
    Could the unit simply be overheating? Have you vacuumed out the air vent that rns along the bottom edge of the mini?
    Good job getting things backed up. How full is the hard drive?
    Luck-
    -DP

  • Hello, I am having a macbook air early 2008 and it is having a hard drive failure i need to replace the hard drive is it possible ? the hard drive number is HS082HB

    Hello, I am having a macbook air early 2008 and it is having a hard drive failure i need to replace the hard drive is it possible ? the hard drive number is HS082HB could you please help !!

    You can replace it with a solid state drive, see the one OWC sells here.  The video on how to install it is here.
    iFixit.com has used hard drives available here.
    If it were me, I'd go with a solid state drive, as the prices have come down recently and the performance improvement is noticeable.

  • Is it possible to bypass the number of partitions limitation (no more than 2) when trying to boot into windows by not using boot camp assistant, and instead just partitioning the drive manually?

    I can't find a specific answer to this question.
    I did have a functioning Windows 8 installation on my MacBook Pro previously. I tried to make a third exFAT partition so as to have a drive mutually readable/writable to both operating systems. This made it so I could no longer boot into my Windows installation.
    I know I'll need the boot camp drivers installed on the Windows installation after the fact, but would manually creating a partition and installing the OS without Boot Camp Assistant work? And would I be able to boot from it while having a total of 3 partitions?

    That's the spirit! 
    Just be sure to have your OS X junk safe in a tested backup, in case the whole thing craps out and you end up having to do a low-level partition and erase of the entire drive.
    And like I said, the problem is not OS X. I've set up mine at least once with 4 partitions holding as many flavors of OS X as can run on the hardware, all perfectly bootable on demand.

  • Driver update and bug reporting t

    I am wondering what users of this forum think about the idea of a responsi've bug reporting mechanism along the lines of the ati catalist programme in which bugs get reported to the drivers department.
    the purpose of this would be for the following
    to enable users to report to creative bugs in the software
    To enable creative to then identify (and acknowlege) problems early and work towards resolving any that appear.
    To enable creative to then offer incremental or updated software on a timely basis.
    This would improve users perception of creative as a company that is responsi've to its users and enable problems to be dealt with promptly.
    Please try and keep comments relvant to the original post as I think it might be interesting to gauge users perception of this idea
    Andy

    Vista?
    Ooh boy.
    http://support.apple.com/kb/TS1538
    Good luck.

Maybe you are looking for

  • Procon Latte is not working and the home page is up for sale. Is it still viable?

    It worked fine until last week. I have a password on the settings but nothing is working. Is it still a good add-on?

  • Cannot see my photo albums in IE 6, 7 or 8.

    I get the following error when testing in Safari using the User Agent what my album will look like to IE users: TypeError: Result of expression 'styleElement.styleSheet' [undefined] is not an object. Where the photo albums should be is blank. I have

  • Report for a range, need to sent individually for a distribution list

    Hi, I have requirement to run a concurrent request for range of values like for e g. conc program to print for a range POs and send Emails to a distribution lists. Right now we are able to generate .pdf output and enable Emailing thru XMLP. We are ac

  • Link between CFM & FI

    Hi Everyone, I am working on FI - CFM at the moment. I wanted to get GL Account no or Document Number (BELNR) for a particular transaction in CFM. Basically I want a link between CFM And FI so that i can link a particular trans and get data from FI.

  • How can I remove leftover RAID metadata from my reserve partition?

    I asked this question in the Microsoft community forum and was sent here by Ruth Buruga a Microsoft Support Engineer Any help would be appreciated. http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_install/how-can-i-remove-leftover-r