Help finding location of Memory corruption using libumem and mdb

Hi there,
I am debugging an application, an rpc based server that runs on a solaris 10 box. This is a server that has a footprint of about 2.3 gigs (while using libumem debug options, its close to 3.5 gigs). Most of the size is because of caching. When certain modifications are done to objects in the cache, a copy of the cache is made by the modifying thread, and then the older copy is freed when no other thread is using it.
One of our customers is using libumem as the memory manager. They started seeing crashes every now and then when the copy of cache is being freed. Obviously, it doesnt crash everytime, and each time the crash is with a different object all together. libumem raises a signal 6 abort, and complains that a piece of memory that is being freed is invalid or corrupt memory. Needless to say, countless hours of code walkthrough, and trying to reproduce the problem in house has failed. So we turned on libumem debugging and logging. Using watchmalloc at this site is not an option because of performance considerations. This is the setup we are using.
LD_PRELOAD=${LD_PRELOAD}:libumem.so.1
export LD_PRELOAD
UMEM_DEBUG=default;export UMEM_DEBUG
UMEM_LOGGING=transaction;export UMEM_LOGGING
We have a core from this crash. I am using mdb to analyze the core.
::umem_status tells me that the address being freed is invalid or corrupt memory. It even shows me where it was initially allocated. I want to find out where this piece of memory got corrupted.
::umalog shows the log of all memory allocation and freeing transactions. But because this is a huge app, it has a ton of information. I tried using address::umalog and that doesnt seem to narrow down the log.
So my question is, given the core generated using these settings, what mdb commands do I use to find out what operation/code corrupted the memory. I would expect to see three pieces of information for the address whose free failed.
1. Where it was initially allocated
2. Where the error/crash occured
3. What operation corrupted the memory, whether its a overwrite or freeing (leading to double free)
I ll be glad to provide more information if needed.
Any help is deeply appreciated.

If you have the address that is corrupt, try finding addresses that are just before the corrupt address. If your corrupt address is 0xF028, for example, look for addresses like 0xF020 or 0XF018. Most likely what's happening is some code is writing too far into a block, corrupting what's in the next block.

Similar Messages

  • Please let me know a good query to find out the memory being used in DB

    Hi All,
    We are using Automotic memory management by using parameter memory_target option. I want to find out the total memory being used and which is free.
    ie;(SGA+PGA). Please let me know.
    Thanks & Regards,
    Vikas Krishna

    Since we are using memry_target we will not get an accurate value there I guess.
    SQL> show parameter memory
    NAME TYPE VALUE
    hi_shared_memory_address integer 0
    memory_max_target big integer 12G
    memory_target big integer 12G
    shared_memory_address integer 0
    SQL> select round(used.bytes /1024/1024 ,2) used_mb
    2 , round(free.bytes /1024/1024 ,2) free_mb
    3 , round(tot.bytes /1024/1024 ,2) total_mb
    4 from (select sum(bytes) bytes
    5 from v$sgastat
    6 where name != 'free memory') used
    7 , (select sum(bytes) bytes
    8 from v$sgastat
    9 where name = 'free memory') free
    10 , (select sum(bytes) bytes
    11 from v$sgastat) tot;
    USED_MB FREE_MB TOTAL_MB
    1660.92 378.71 2039.62
    Thanks & Regards,
    Vikas Krishna

  • Please Help! Problem with 'whistle' when using Audition and Premeire Pro 1.5 with Audigy

    I hope someone can help with this problem. The start of these messages is at the bottom. Any suggestions would be most welcome...Bill Allen
    Hi David (00)... Thanks for your reply. I just wanted to let you know
    that I am going to post all of this correspondence on as many Creative
    forums that I can find in hopes of finding someone that help with this
    problem.
    I will advise you of the results
    Thanks again...Bill Allen
    ----- Original Message -----
    From: "Creative Americas Customer Support"
    To: "Bill Allen"
    Sent: Saturday, February , 2006 :39 AM
    Subject: Re: Creative System Information (English : Adobe Premeire Pro .5
    and Adobe Audition) (KMM987992I6636L0KM)
    > Sir,
    >
    > The only time that I've see a random tone being generated as you
    > decribe, it was necessary to update the system bios to correct.
    >
    > While we are able to playback and record with the card and it's included
    > software, Adobe continues to not allow you to monitor what you're
    > recording. As best we can tell, there's nothing wrong with the card and
    > I would urge you to check with Adobe for any "monitor recording"
    > switches that may be in their software.
    >
    > For faster service please reply with previous correspondence when
    > replying to this email.
    >
    > Best Regards
    > ,
    >
    > David (00)
    > Team Specialist
    >
    > Technical Support
    > Creative Labs Americas
    >
    >
    >
    > To provide feedback on your "Creative Experience" please click on the
    > following link:
    >
    Link removed
    >
    > This link is provided so that you may provide feedback on your "Creative
    > Experience". If you require further troubleshooting or have additional
    > questions simply reply to the original mail and we will be glad to
    > assist you.
    >
    > Original Message Follows:
    > ------------------------
    > Jeen... I appreciate, very much, your reply. But I don't appreciate
    > trying
    > to be 'ping ponged' back and forth between Creative and Adobe. While I
    > realize that you can only deduce a solution from what I tell you, I
    > believe
    > that if you re-read my description of the problem you will realize that
    > the
    > problem is with the sound card and it's associated software. Otherwise
    > why
    > would the system work as expected when it it turned on the next morning?
    >
    > I would also like to know where the 'tone' comes from. When recording
    > video segment (with audio) through the firewire connection of the
    > Creative Audidgy 2ZS card, after a short while the audio is replaced with a
    > constant tone (as I said, it is about 200 Hz). If I record the video thru the
    > Firewire connection and the audio through the 'Line-In' connection,
    > there is no problem with the recording the audio track 'tone free'. However,
    > sometimes but not always, when the audio is played back the tone will
    > appear. This has happened with both Adobe Premeire Pro .5 and Adobe
    > Audition. It is not in the audio track of Adobe Premeire Pro .5 or
    > Adobe Audition, so the problem must lie with the Creative Audigy 2ZS card or
    > it's associated software. I'm sure your audio engineers have knowledge of
    > this problem and I would appreciate an answer.
    >
    > Thanks...Bill Allen
    >
    > ----- Original Message -----
    > From: "Creative Americas Customer Support"
    >
    > To: "Bill Allen"
    > Sent: Friday, February 0, 2006 2:5 AM
    > Subject: Re: Creative System Information (English : Adobe Premeire Pro
    > .5
    > and Adobe Audition) (KMM9780I6636L0KM)
    >
    >
    >> Dear Bill,
    >>
    >> Thank you for replying back to Creative Technical Support.
    >>
    >> With regards to your issue, I understand that you are having
    > difficulty
    >> getting the audio to record from the applications Adobe Premiere Pro
    > .5
    >> and therefore not sound during the playback.
    >>
    >> As you have verified that the sound card is working properly with the
    >> other applications on recording or playback, this could be due to the
    >> improper setup for the audio in the Premiere Pro .5.
    >>
    >> You may like to refer to Adobe for assistance on the configuration of
    >> the audio settings as we are not in a better position to advise you on
    >> third party software.
    >>
    >> Should you have not sound or issues with our software, please feel
    > free
    >> to contact us so that we can assist you.
    >>
    >> For faster service please reply with previous correspondence when
    >> replying to this email.
    >>
    >> Best Regards
    >> ,
    >>
    >> Jeen
    >> Technical Support
    >> Creative Labs Americas
    >>
    >>
    >>
    >> To provide feedback on your "Creative Experience" please click on the
    >> following link:
    >>
    Link removed
    >>
    >> This link is provided so that you may provide feedback on your
    > "Creative
    >> Experience". If you require further troubleshooting or have additional
    >> questions simply reply to the original mail and we will be glad to
    >> assist you.
    >>
    >> Original Message Follows:
    >> ------------------------
    >> Ronshone... Thanks for your reply.
    >>
    >> Here is the information you requested:
    >>
    >> Sound Blaster Audigy 2ZS
    >> PID: 0 03 50 00 00 00 02
    >> Driver Ver: 2.8.4
    >> Firmware : 0.0.0
    >> Model: SB.0350
    >> Serial Number: MSB0350472004288E
    >> Ink stamp: 50SPT470D
    >>
    >> The Audigy 2ZS is the only sound card installed
    >> The Audigy 2ZS card is at least one slot away from the graphics card.
    >> The Audigy 2ZS card is one slot away from another card.
    >> The Audigy 2ZS card is properly seated in the PCI slot.
    >> The PC's internal wires have been moved away from the Audigy 2ZS card
    > .
    >> The 'on-board' sound is disabled thru the BIOS.
    >> The 'on-board' game port is disabled thru the BIOS.
    >> The XP Pro operating system is up to date with all updates.
    >> There were no background operation going at the time of the tests.
    >> The anit-virus program was closed
    >> The CPU is not overclocked.
    >> And, I am the Administrator.
    >>
    >> The card came in a Creative retail Box along with the input unit that
    >> mounts
    >> in the dri've bay. I can't recall what that is called.
    >>
    >> I have relocated the sound card to a slot that is 4 slots away from
    > the
    >> graphics card and slot away from another card, in this case an
    >> additional
    >> IDE dri've controller.
    >>
    >> I have performed the test you outlined. I found that I had to record
    >> using
    >> the 'line in' source input. And I had to playback using the 'wave'
    >> source.
    >> As far as that test is concerned, everything worked. However when I
    >> bring
    >> up Adobe Premeire Pro .5 I do not hear the audio when capturing, and,
    >> even
    >> though the audio meters in Premeire Pro in indicate that there is
    > audio
    >> playing from the audio track on playback, I hear nothing from the
    >> speakers.
    >>
    >> I then brought up the Creative Speaker Settings requester and did a
    >> diagnostic test. All tests indicated "pass". But when I click on the
    >> 'Speaker Settings' and perform the 'Speaker Test' I hear nothing. I
    >> should
    >> add that in both mixers, the Creative Surround Mixer and the Play
    >> Control
    >> mixer, all inputs and outputs are selected (not muted). Also when I
    >> performed this same test yesterday the 'Speaker Test' worked fine.
    >>
    >> On rebooting, the 'Windows XP' sound is heard from the speakers.
    >> Bringing
    >> up Adobe Premeire Pro .5, the audio played as expected. The 'Speaker
    >> Test'
    >> in the Creative Surround Mixer also worked as expected.
    >>
    >> I then recorded the rest of my program using the Adobe Premeire Pro
    > .5
    >> 'Capture' requester and when I tried to playback from within Adobe
    >> Premeire
    >> Pro .5 all I got was a constant tone (about 200 Hz), even though the
    >> audio
    >> meters in Adobe Premeire Pro .5 indicated that the audio was good and
    >> had
    >> no constant tone.
    >>
    >> I rebooted the computer and brought up Adobe Premeire Pro .5 and my
    >> program. Without making any changes to either mixers, Adobe Premeire
    > Pro
    >> .5
    >> performed, and the sound played, as expected. In the 'Play Control'
    >> mixer
    >> only the 'wave' was acti've. All the rest were muted. It was the same
    >> for
    >> the 'Creative Surround Mixer'.
    >>
    >> I am at a loss as to what the problem is. Any help would be
    >> appreciated.
    >>
    >> ...Bill Allen
    >> ----- Original Message -----
    >> From: "Creative Americas Customer Support"
    >> @customercare.creative.com
    >> To: "Bill Allen"
    >> Sent: Monday, February 06, 2006 9:42 PM
    >> Subject: Re: Creative System Information (English : Adobe Premeire Pro
    >> .5
    >> and Adobe Audition) (KMM933384I6636L0KM)
    >>
    >>
    >> Dear Bill,
    >>
    >> Thank you for contacting Creative Technical Support.
    >>
    >> With regards to the issue you are having, I would really appreciate it
    >> if you can provide me with the model number of the sound card. It
    >> should
    >> start with CT or SB followed by 4 numbers found on the sound card. I
    >> also need the serial number which can be found on the sticker and the
    >> ink stamp which is printed on the back of the card. This number will
    >> not
    >> be located on any of the stickers and it will not be labeled. It is a
    >> number that has been stamped on the card itself, possibly near the
    >> outer
    >> edge of the card to determine the best advice for you.
    >>
    >> Did the sound card come pre-installed in the PC, comes in a plastic
    >> cover or brown box or did it come in a Creative retail box package?
    >>
    >> Below is a link that may help with the location of the model number.
    >>
    >> Run a keyword search for SID2456 from the link below.
    >>
    Link removed
    >>
    >> I also need you to try the following recording test.
    >>
    >> SELECT THE RECORDING SOURCE IN SURROUND MIXER
    >> . Go to Start Programs Creative SB Audigy Surround Mixer
    >> 2. Click on the Recording Source (should be on the right side of the
    >> mixer under the REC label)
    >> 3. Change the recording source to Analog Mix
    >> 4. Mute the other analog sources (Mic, CD Audio, Auxiliary, Tad, PC
    >> speaker) that you don't want recorded with the audio stream.
    >> 5. You may wish to select "record without monitoring" by click on the
    >> (+) above the Analog Mix recording source. This keeps the source from
    >> playing out to speakers while recording
    >>
    >> TEST RECORD THE AUDIO
    >> . Go to Start Programs Accessories Multimedia Sound Recorder.
    >> 2. Click the Record button (red dot)
    >> 3. Talk into the microphone
    >> 4. Let it record the source for a little bit
    >> 5. Hit the Stop button (black square)
    >> 6. Hit the play button (single arrow pointing right)
    >> 7. You should now hear the audio that you recorded.
    >>
    >> If you are still having issues, I recommend you to ensure the
    > following
    >> for the audio installation and test:
    >>
    >> - The card is the only card installed other than the Graphics card.
    >> - The card is at least one empty slot away from the Graphics card.
    >> - Place the soundcard away from all the others.
    >> - That the card is seated properly in the PCI slot.
    >> - Move the PC's internal wires away from the soundcard.
    >> - That the on-board sound on your motherboard is disabled through the
    >> BIOS.
    >> - That the on-board gameport is disabled through the BIOS.
    >> - That your motherboard BIOS is up-to-date.
    >> - That the operating system is up-to-date with the latest service
    > packs
    >> and patches.
    >> - That there are no background applications open when you attempt the
    >> solution.
    >> - That the anti-virus program is disabled.
    >> - That if you are over-clocking your system, return all options to
    >> their
    >> recommended settings.
    >> - That you access the PC with administrator rights.
    >>
    >> Do reply back to me if you are still having problems with any error
    >> messages prompted. Thanks.
    >>
    >> For faster service please reply with previous correspondence when
    >> replying to this email.
    >>
    >> Best Regards
    >> ,
    >>
    >> Ronshone
    >> Technical Support
    >> Creative Labs Americas
    >>
    >>
    >>
    >> To provide feedback on your "Creative Experience" please click on the
    >> following link:
    >>
    Link removed
    >>
    >> This link is provided so that you may provide feedback on your
    >> "Creative
    >> Experience". If you require further troubleshooting or have additional
    >> questions simply reply to the original mail and we will be glad to
    >> assist you.
    >>
    >> Original Message Follows:
    >> ------------------------
    >> User Detail
    >> ----------------------------------------
    >> Name : Bill Allen
    >> Email Address : [email protected]
    >> Self Description : Intermediate PC User
    >>
    >> Creative Product Information
    >> ----------------------------------------
    >>
    >> Problem Type : I need help with a third-party software application
    >>
    >> Problem lies with:
    >> ----------------------------------------
    >> Adobe Premeire Pro .5 and Adobe Audition
    >>
    >> Customer's System Specification
    >> ----------------------------------------
    >>
    >>
    >> Detailed Problem Description
    >> ----------------------------------------
    >> I can hear sound from my computers speakers. The diagnostic tests
    >> performed by the Creative software are all "OK", but I cannot record
    >> audio with either of the two programs mentioned above. I have checked
    >> everything I can think of and all of the settings appear to be "OK".
    > I
    >> have also updated the driver for the sound card. What can I do?
    >>
    >> Attachment :
    >> [ Attachment Type: application/octet-stream Name: CTSi.cab]

    TeamRacing6 wrote:
     b noir,
    I can get itunes to start if I disable Bonjour or if I "repair" it first. Sometimes I can repair Bonjour though add/remove programs, sometimes it will only "repair" using WinRar. Sometimes I have to "repair" Bonjour 2 or 3 times to get iTunes to start.
    I have tried uninstalling and reinstalling at least a dozen times. I have tried redownloading iTunes at least 5 times and from different links. This leads me to believe that the dnssd.dll file is not itself corrupt, but this newest version is causing a conflict with XP somewhere somehow.
    Team, iTunes 10.2.2.12 has just been released. I installed it and checked, and BonJour's been updated to version 2.0.5.0, and there's a new 2.0.5.0 version of dnssd.dll on my system. So I reckon it's worth a try updating to that to see if it's of any help with your trouble.

  • Expert help needed to connect iPhone / iPad using BlueTooth and Wi-Fi

    We need expert help to connect iPhone / iPad using BlueTooth and Wi-Fi. If you have worked with Apple MFi Program [http://developer.apple.com/programs/mfi], or have expertise/experience in this, please contact me. Thanks! Kevin.

    Hi there.
    I connected to my livebox after about three attempts. You have to pair the livebox by pressing either the number one or two that is on the box. When it is in pair mode it stays that way for ten minutes so it gives you chance to try your wep code that is on the bottom of the box a few times. I can't remember which one was successful but i did try the letters in uppercase and lower and one of them seemed to connect.
    Welcome to discussions by the way.
    Hope this helps JB

  • Management of memory space - using totalMemory() and maxMemory()

    I'm writing an app and applet which if "users" select too many images to display would easily create an java.lang.OutOfMemoryError. When loading images, I can used totalMemory() and maxMemory() to see what's being used and available before and/or after loading an image.
    Is there a desirable "headroom" between totalMemory() and maxMemory() for "normal" JVM operations? In the case of the applet, there should be few net new objects created once the applet starts besides the images cached based on their selections.
    My thinking is to limit the total memory available for image caching based on the the difference maxMemory() - "headrooom" - "application base object totalMemory()"
    TIA,
    Roy

    RoyEpperson wrote:
    I understand profiling the application to see what demands it has. Assuming the app/applet logic is not creating and disposing new objects, how much space does the JVM need to do it's "housekeeping"? or is that already allocated on initial invocation of the application?It isn't as simple as that.
    I have gotten the VM (1.5 I believe) to start with something like a 3meg (somewhere around there) max heap. Although interesting that isn't usable.
    When the VM loads something, like the regex api it is hard to say what actually gets loaded when. And when you create instances it takes more space as well.
    So if you just want to guess then I would start with 32meg.

  • How to Find the Location in Google Maps using Latitude and Longitude

    Hai,
    I need to find the Location from Google Maps, which is match with the Latitude and Longitude values we are sending.
    This will be done by using pure java class i need, can anyone having the sample code for this.
    It's Urgent, please help me
    Expecting replies...

    Yes we were having the performance issues when it is getting locked? in this what i want to know
    why it happens suddenly?
    or what package this piece of code is calling?
    or is there any possiblity of system will degrade the performance like sys user etc...?
    where exactly i found the root cause for further analysis?
    so that next time onwards if particular objects is locking we come to know why it happens is there any logical false or how do we eliminate this issue last time?
    coz in our environment sometimes most of lockings are from the same table?
    pls let me know where i have to concentrate for debug and how to troubloshoot and reslove this
    sorry for the inconvience.. i m expecting the answer from here. if anybody wants some more info i ll let him know.
    as of till now i got some docs i start to read this.
    Regards
    M.Murali..
    Note: will system/sys degrade the performance ?if so how ?

  • I need help finding an old game I used to play

    It was a space adventure rpg and you had a yellow ship, and you flew around and collected resources and fought enemies. All I remember is the yellow ship. Help!

    The first step in Upgrading... is to Snow Leopard = OS X 10.6.x
    It is Not available as a download... It is a Paid Upgrade.
    Do this first...
    Check that your Mac meets the System Requirements for Snow Leopard...
    Snow Leopard Tech Specs
    http://support.apple.com/kb/SP575
    If so... Purchase a Snow Leopard Install Disc...
    http://store.apple.com/us/product/MC573Z/A/mac-os-x-106-snow-leopard
    Other countries...
    http://support.apple.com/kb/HE57
    After the Successful Install, run Software Update to get the latest updates for Snow Leopard and iTunes.
    Next... MAVERICKS...
    Check here to see if your Mac is compatible...
    http://www.apple.com/osx/how-to-upgrade/

  • HT4759 my ipad has been stoten, I am trying to track it down but no luck so far. please help me locate my ipad I used it mostly for school purposes.

    How can I track my ipad down? It was stolen on 05-07-14 . I reported it to the police, but I don't know if they are going to be able to do something about it, or not. please help.

    Lost or Stolen iOS device > http://support.apple.com/kb/HT5668

  • Why don't pdf open in Preview, it asks where Adobe Acrobat is located? I never used Acrobat and do not want to use it.

    I am using Safari 5.0.5 and open a page that is a PDF and only a black screen comes up and asks where I have Adobe Acrobat. I do not have Acrobat and want to use preview. I looked in the Safari preferences and there is no place to set it so PDFs only use Preview. Please help!
    John

    Right or control click a PDF file you already have on the hard drive then click Get Info.
    In the Get Info panel from the pop up menu next to: Open with
    Select: Preview
    Then click: Change All

  • VB 2012 - Help Finding Specific Numbers in a Database Column and Count the Number of Times They Appear.

    Hello,
    I am doing a project that uses MS Access to access data about a baseball team . The MS Access Database provides the names, addresses, and age of the players. All the players are 12, 13, or 14 years old. I need to display the average age for the team on a
    label, which was easy. The problem is that I also have to display the number of players who are 12, 13, and 14 years old and I have no idea how to do that.
    Here is my code so far:
    Public Class frmBaseball
    Private Sub TeamBindingNavigatorSaveItem_Click(sender As Object, e As EventArgs) Handles TeamBindingNavigatorSaveItem.Click
    Me.Validate()
    Me.TeamBindingSource.EndEdit()
    Me.TableAdapterManager.UpdateAll(Me.LittleLeagueDataSet)
    End Sub
    Private Sub frmBaseball_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    'TODO: This line of code loads data into the 'LittleLeagueDataSet.Team' table. You can move, or remove it, as needed.
    Me.TeamTableAdapter.Fill(Me.LittleLeagueDataSet.Team)
    End Sub
    Private Sub btnAges_Click(sender As Object, e As EventArgs) Handles btnAges.Click
    Dim strSql As String = "SELECT * FROM Team"
    Dim strPath As String = "Provider=Microsoft.ACE.OLEDB.12.0 ;" & "Data Source=e:\LittleLeague.accdb"
    Dim odaTeam As New OleDb.OleDbDataAdapter(strSql, strPath)
    Dim datAge As New DataTable
    Dim intCount As Integer = 0
    Dim intTotalAge As Integer
    Dim decAverageAge As Decimal
    odaTeam.Fill(datAge)
    odaTeam.Dispose()
    For intCount = 0 To datAge.Rows.Count - 1
    intTotalAge += Convert.ToInt32(datAge.Rows(intCount)("Age"))
    decAverageAge = Convert.ToDecimal(intTotalAge / datAge.Rows.Count)
    Next
    lblAverage.Visible = True
    lblAverage.Text = "The average age of the team is " & decAverageAge.ToString("N2")
    lbl12.Text = "The number of 12 year olds is "
    lbl13.Text = "The number of 13 year olds is "
    lbl14.Text = "The number of 14 year olds is "
    lbl12.Visible = True
    lbl13.Visible = True
    lbl14.Visible = True
    End Sub
    End Class
    I think I should use a For..Next loop but I don't know how to identify and match using this database, and then count how many repeated 12, 13, 14 years old there are.
    Any help would be really appreciated.

    Hello,
    Conceptually speaking you would group the data and count. Beings this is school work the demo below is a static example and not suitable for your assignment, its to show a point. Now if you have learned about LINQ and Lambda this logic can apply to your
    question but need to work out using this your data which can be done. If not look at using SQL Grouping.
    Example of SQL grouping and count
    select country, count(country) as count from customers group by country
    Module Module1
    Public Sub GroupingDemo()
    Dim dt As DataTable = SimulateLoadFromDatabase()
    Dim TeamData = dt.AsEnumerable.GroupBy(
    Function(student) student.Field(Of Integer)("Age")) _
    .Select(Function(group) New With
    Key .Value = group.Key,
    Key .Info = group.OrderByDescending(
    Function(x) x.Field(Of String)("Name"))}) _
    .OrderBy(
    Function(group) group.Info.First.Field(Of Integer)("age"))
    Dim dictData As New Dictionary(Of String, String)
    For Each group In TeamData
    Console.WriteLine("Group: {0} count: {1} ", group.Value, group.Info.Count)
    dictData.Add(group.Value.ToString, group.Info.Count.ToString)
    ' The following is not needed but good to show
    For Each item In group.Info
    Console.WriteLine(" {0} {1}",
    item.Field(Of Integer)("Identifier"),
    item.Field(Of String)("Name"))
    Next
    Next group
    Console.WriteLine()
    Console.WriteLine("This data can be used to populate control text")
    For Each Item As KeyValuePair(Of String, String) In dictData
    Console.WriteLine("{0} {1}", Item.Key, Item.Value)
    Next
    End Sub
    Private Function SimulateLoadFromDatabase() As DataTable
    Dim dt As New DataTable With {.TableName = "MyTable"}
    dt.Columns.Add(New DataColumn With {.ColumnName = "Identifier", .DataType = GetType(Int32),
    .AutoIncrement = True, .AutoIncrementSeed = 1})
    dt.Columns.Add(New DataColumn With {.ColumnName = "Name", .DataType = GetType(String)})
    dt.Columns.Add(New DataColumn With {.ColumnName = "Age", .DataType = GetType(Int32)})
    dt.Rows.Add(New Object() {Nothing, "Bill", 13})
    dt.Rows.Add(New Object() {Nothing, "Karen", 14})
    dt.Rows.Add(New Object() {Nothing, "Jim", 13})
    dt.Rows.Add(New Object() {Nothing, "Paul", 15})
    dt.Rows.Add(New Object() {Nothing, "Mike", 14})
    dt.Rows.Add(New Object() {Nothing, "Jill", 13})
    Return dt
    End Function
    End Module
    Output in the IDE output window
    Group: 13 count: 3
    3 Jim
    6 Jill
    1 Bill
    Group: 14 count: 2
    5 Mike
    2 Karen
    Group: 15 count: 1
    4 Paul
    This data can be used to populate control text
    13 3
    14 2
    15 1
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

  • HELP WITH DOING BANNER AD ROTATION USING FLASH AND ASP

    I need to know how to do Banner Advertisement (AFFILIATE ADS)  in Flash using ActionScript  3 in Document Class(BANNERADS.AS).
    I have
           GETBANNERADS.ASP (ASP Web Program)
                  Retrieves Next AD (IMAGEURL, NAVIGATEURL) containing Banner and Advertiser URL
                            BANNER                     ADVERTISER URL
                            BUSHDOCTOR.GIF      http://www.clickbank.com
                            SIZZLA.GIF                  http://www.amazon.com/AMAZON.PHP?AFFILIATE_CODE=2345
                            EXODUS.GIF               http://www.godaddy.com/GODADDY.PHP?AFFILIATE_CODE=77777
                            UPRISING.GIF             http://www.easycgi.com/
           BANNERADSDBF.MDB (Microsoft Access Database with list of AFFILIATE ADVERTISEMENTS)
           BANNERADS.SWF
    package {
         import flash.display.MovieClip ;
         public class BANNERADS Extends MovieClip {
               public function BANNERADS() {    
                      var PICTURE:Loader  = New Loader();
                      var IMAGEURL:String    = "";
                      var NAVIGATEURL:String = "";
                      while (  ) {
                            LoadVariable("GETBANNERADS.ASP", IMAGEURL, NAVIGATEURL);
                            PICTURE.Load(New URLRequest(IMAGEURL));
                            PICTURE.AddActionListener(evt.COMPLETE, onload);
               public function onload() { 
                     PICTURE.AddActionListener(MouseEvent.CLICK, onClick);
               public function onClick() {
                      geturl(NAVIGATEURL);

    package (
                      import flash.display.Sprite;
                      import flash.events.*;
                      import flash.net.URLLoader;
                      import flash.net.URLLoaderDataFormat;
                      import flash.net.URLRequest;
                      public class Main extends Sprite {
                                     public function Main() {
                                              var PICTURE:Loader            = New Loader();
                                             PICTURE.addEventListener(Event.COMPLETE, onLoaded);
                                             var LOADER :URLLoader         = new URLLoader();
                                             LOADER.addEventListener(Event.COMPLETE, getdata);
                                             LOADER.dataFormat             = URLLoaderDataFormat.VARIABLES;
                                             var IMAGEURL    :String           = "";
                                            var ADVERTISERURL :String     = "";
                                             var COUNTER      :Number       = 0;
                                             var MAX               :Number       =0;
                                             while ( COUNTER <= MAX)       {
                                                             COUNTER   = COUNTER + 1;
                                                             var requester:URLRequest = new URLRequest("BANNERADS.ASP");
                                                             requester.method         = URLRequestMethod.POST;
                                                             LOADER.load(requester);
                                                             if (COUNTER == MAX) {
                                                                        COUNTER = 0; 
                                     public function getdata(){
                                                 var loader2 : URLLoader = new URLLoader(Event.target);
                                                 loader2.dataFormat      = URLLoaderDataFormat.VARIABLES;
                                                 var IMAGE   :URLRequest = new URLRequest(loader2.data.IMAGEURL);
                                                 ADVERTISERURL            = loader2.data.NAVIGATEURL;
                                                 MAX                                = loader2.data.MAXCOUNT;
                                                 PICTURE.load(IMAGE);
                                     public function onLoaded(){
                                               PICTURE.addEventListener(MouseEvent.CLICK, onClick);        
                                     public function onClick(){
                                               navigateToURL(ADVERTISERURL);

  • Please help :( finding the diference between a table value and a count

    Ok... Pretty much, atm I am trying to make a view which is a capacity (specified by a table) minus a count(*) of all the tables, what I am doing is getting the capacity and atempting to take it away from a joined table which contains all of the people booked into a certain flight.. I know it sounds crazy, but I'm sure (surely hopeful) it will work..
    To sum my question up, how can I make a view which has one table minus a numerical result from a count(*)... If I can that is.
    EDIT:
    I have made somthing which could be possibly ported into a function which returns the correct answer.. maybe is it better/possible to make the view somehow start a function?
    Edited by: 893357 on Oct 26, 2011 11:17 AM

    How about starting with this "design" (I came up with it in 20minutes so it can be refined further)
    FLIGHT_MASTER
    (FLIGHT_NUMBER  VARCHAR2(6) primary key,
    FROM_CITY_CD  VARCHAR2(6),
    TO_CITY_CD    VARCHAR2(6)
    FLIGHT_DETAILS
    (FLIGHT_ID     NUMBER primary key,
    FLIGHT_NUMBER VARCHAR2(6) foreign key references FLIGHT_MASTER (FLIGHT_NUMBER),
    SCHEDULED_DEPARTURE DATE,
    ACTUAL_DEPARTURE DATE,
    TOTAL_SEATS NUMBER(4,0),
    BOOKED_SEATS NUMBER(4,0)
    FLIGHT_BOOKINGS
    (PNR          VARCHAR2(6) primary key,
    FLIGHT_ID    NUMBER foreign key references FLIGHT_DETAILS (FLIGHT_ID),
    SEATS_BOOKED NUMBER(4,0)
    PASSENGER_DETAILS
    (PASSSENGER_ID  NUMBER primary key,
    PNR          VARCHAR2(6) foreign key references FLIGHT_BOOKINGS (PNR),
    TICKET_TYPE_FLAG  VARCHAR2(3),
    PASSENGER_FIRST_NAME VARCHAR2(30),
    PASSENGER_SECOND_NAME VARCHAR2(30),
    PASSENGER_LAST_NAME  VARCHAR2(30),
    PASSENGER_PHONE    VARCHAR2(30),
    PASSENGER_ADDRESS_1  VARCHAR2(60),
    PASSENGER_ADDRESS_2  VARCHAR2(60),
    PASSENGER_ADDRESS_3  VARCHAR2(60),
    PASSENGER_CITY       VARCHAR2(60),
    PASSENGER_COUNTRY    VARCHAR2(60)
    select fm.flight_number, fm.from_city, fd.flight_id, fd.scheduled_departure, fd.total_seats,
    fd.total_seats - fd.booked_seats available_seats
    from flight_master fm, flight_details fd
    where fm.flight_number='&flight'
    and fd.scheduled_departure = '&scheduled_date_time'
    and fm.flight_number=fd.flight_number
    -- whenever a new reservation is made (only if available_seats >= required_seats)
    select from flight_details for update of booked_seats where .....
    insert into flight_bookings ...
    insert into passenger_details ...
    ... store the number of seats in a variable :purchased_seats
    update flight_details set booked_seats = booked_seats + :purchased_seats
    commitHemant K Chitale

  • Libumem and java native leaks

    I'm diagnosing a native memory leak in a java process(not caused by a user JNI library, probably due to not closing some stream tied to native resources). I had used this technique before with some success, but this time I'm running into some problems. Basically what I'm doing is using libumem and mdb to help find the leak. I realize that these tools can give some strange results when looking at the JVM, but previously when I have it used, I can just focus on the leaked buffers with a large count and that pointed me right to the problem(the problem is bad enough that eventually I run out of memory space for the process...so I know the leak is being triggered repeatedly). The first problem I have is with libumem/mdb and the stack printed out through bufctl_audit which only displays symbol addresses for java routines. If it displayed the java symbol names, or if there were a way to make it display them then I wouldn't have much of a problem(though I've found I need to increase the audit size because of the large stack frame for a java process).
    So what I've done before is find the C library/routines where the memory is being leaked at, and then use dtrace to print stack traces for calls into that C library. Something like this:
    dtrace -n 'pid$target:libzip:ZIP_GetEntry:entry { @s[jstack(60,3000)] = count() }' -p <PID>
    This has pointed me to the right place in the past, because the place where the leak was happening was getting called frequently. The problem is with the current leak is this is much too course grained. The C library being called is being called quite often, so I'm getting way too many stacks, and sorting through to find the problematic one is difficult. Now if jstack() would show the java symbol name AND its address I could easily correlate it with what's in the findleaks/bufctl_audit output of libumem/mdb.
    Is there something I can do inside mdb to help find the java symbol names, or is there a way to use dtrace to correlate the java symbol name with its address to help me out here? I can do some rather ugly iterative stuff with dtrace where I don't give it a large enough buffer to print the whole stack trace and with small increases probably find the mappings from the java symbols to the address, but I was hoping there was something a little less painful. This of course needs to be diagnosed in a production system...so what I can do is somewhat limited. There is redundancy, so I obviously can for a short period pause execution on one server to grab the findleaks output and things like that. Thanks,
    Micah

    Since your question is about tracing Java internals, you might do better posting in a Java-related forum. (This forum is for Sun Studio, for developing in C, C++, and Fortran.) Try one of the forums listed under Java here:
    [http://forums.sun.com/index.jspa?tab=forums]
    and especially here:
    [http://forums.sun.com/category.jspa?categoryID=39]

  • How to find which sequence name is used in a table

    Hi..
    I have a table.. it uses some sequence name..
    But how can we find that the table is using so and so sequence...
    From which USER_* table is used for that
    thanks

    user5451445 wrote:
    I know this is an old thread but I was in the position of the original author and I use this, based on responses here I make this query that can be useful when the sequence is attached to the table using triggers (the most common scenario). I would agree that the most common use of a sequence is probably to generate a PK for a table.
    I would agree that, when using a sequence to generate a PK, using a trigger is best practice.
    But those two agreements do NOT add up to validating you assumption that "attaching" a sequence to a table using a trigger is the most common scenario.. Many shops feel that triggers are inherently evil and forbid there use. Even without that, many developers refuse to use the facilities of the database and insist on putting everything in their app code. Thus, even when using a sequence, they embed it in their app, thus allowing the use of the sequence to be bypassed by other code.
    And in the case of someone trying to locate the use of the trigger, they must keep in mind that not all application code is in PL/SQL modules - it may very well exist completely outside of the database and thus be invisible to any query you could run on the database.
    Let's say we have a table tblproceso and a sequence proceso_id_seq, we wrote a trigger that put the next value from the sequence on every INSERT. With this query we can see in what table we use sequences like 'proceso_id_seq':
    select trigger_body, table_name
    from user_triggers
    where triggering_event = 'INSERT'
    and UPPER(dbms_metadata.get_ddl ('TRIGGER', trigger_name)) LIKE '%PROCESO_ID_SEQ%'
    This will show the trigger body and the name of the table where it's used
    Hope this can help other users with this scenario

  • Cannot find location with iPad 2

    Cannot find location: I have an iPad 1 and a newly acquired iPad 2; even if they are side by side, the iPad 1 will find its location, while the iPad 2 cannot, and thus, lots of applications do not work. What to do ?

    Hi Ogie4139,
    Since you're missing both the AirPlay and AirDrop icons from the Control Center, please try and reinstall iOS on your iPad by following the directions below.
    Make sure that you have iTunes 12 or later on your computer.
    Put your device in recovery mode.
    When you get the option to restore or update, select Update. This will reinstall iOS without erasing your data.
    If your iPhone, iPad, or iPod touch doesn't respond or doesn't turn on - Apple Support
    Thanks for using the Apple Support Communities!
    Cheers,
    Alex H.

Maybe you are looking for

  • Can't install bootcamp 2.1 on windows vista 64

    Hi, I'm trying to install bootcamp 2.1 on vista 64, I've tried through ASU (Apple Software Update) and Downloaded the version avaliable on apple support page. ASU says it can't install it. And the downloaded version simply crashes with no message. I

  • RMI-IIOP Example for Java SE 6

    Hi. Can someone provide me an example (link or code) of how to write an RMI-IIOP remote object, bind it to jndi (glassfish) and then call it from within the glassfish application server (I'm calling from an EJB). The guide available at http://java.su

  • Billing date as a system's current date

    Dear All, Greetings. How can we do such a configuration whereby let the DEL.NOTE/PGI date whatever it may be(Posted in past),but whenever it comes for invoice/billing generation, system should pick billing date as a today's/current system's date only

  • Is there a way to maintain synchronization of slide display and playhead position?

    Hi, I'm working with Captivate 5 and I'm trying to add some highlights to various features in a full motion recording (FMR).  Frustratingly, while I can preview the recording by dragging the playhead through the timeline, when I release the playhead,

  • Trying to download Photoshop older version's

    I am having much trouble downloading my Photoshop Elements 11 and my Premier 11.  It tells me I need something else to download them.  Would that be my older version of Photoshop 6.  If so I don't have it anymore Can someone help me please and thanks