Date: 201701
Local time of day: 1801-2400
Location: ZZZ.Airport, US
Light: Dusk
Aircraft: A319
Operator: Air Carrier
Operating under: Part 121
Flight plan: IFR
Mission: Passenger
Flight phase: Descent
ATC / advisory: Center ZZZZ
Aircraft component: Autoflight System
Component problem: Malfunctioning
Reporter organization: Air Carrier
Reporter function: First Officer; Pilot Flying
Reporter qualification: Flight Crew Air Transport Pilot (ATP)
Human factors: Situational Awareness
Second reporter function: Captain; Pilot Not Flying
Anomaly: Aircraft Equipment Problem Less Severe; Deviation - Altitude Excursion From Assigned Altitude; Deviation / Discrepancy - Procedural Clearance; Deviation / Discrepancy - Procedural Published Material / Policy
Detector: Person Flight Crew
When detected: In-flight
Result: Flight Crew Returned To Clearance; Flight Crew Became Reoriented; Flight Crew Overcame Equipment Problem
Contributing factors: Human Factors; Aircraft
Primary problem: Ambiguous

Narrative: I was flying the aircraft at .79 Mach in managed cruise mode at FL390. We were cleared to FL240 twenty miles before the TOD as depicted on the Nav display. I set 24000 on the altitude selector window and the Captain verified it. I then check the PERF on FMS and made sure I had .78/300 programmed properly. Once I verified it; I then pushed the altitude push button to start the descent to FL240. I told the Captain I was starting down and verified the FMA changed to DES mode. Once I verified that; I looked outside to see how far below us an existing cloud layer was and the Captain and I decided to switch on the Engine Anti-ice. After selecting the Anti-ice on I then came back to my instruments to make sure my descent path looked good. This is when I noticed the aircraft went into a climb at approximately 3000 FPM and was passing 39600. I verified it using the Captains VVI (Vertical Velocity Indicator) and immediately disconnected the autopilot and slowly and gently pushed the nose over and started the aircraft back down towards the cleared altitude of FL240. The altimeter read about 40;100 before I could get the descent started. So we exceeded the ceiling of the aircraft. We were then given a descent to 11;000. We checked that all data was correct and re-engaged all automation and all was fine for the remainder of the flight.When this occurred; I was only off the gauges for about 10-15 seconds. We both checked all the FMS entries and both the FMA and the perf page said the data was correct and showed were in fact in the descend mode of operation; yet the aircraft entered a climb! I strongly believe there is a software abnormally which needs to be researched. Can I get feedback as to whether this has happened before on our aircraft? If there is a history of this; I believe there should be a message released and Airbus should research this problem.The only action that could have stop this was to stare at the instruments and make sure that the VVI went down and stayed in the down direction. Otherwise this is a very strange event that occurred at a very bad place inflight.


Second narrative: The climb rate approached 3000 FPM and the maximum altitude reached was FL401. There were no pilot entered errors on FCU or in the FMCG (Flight Management Control Guidance) and I could not find any discrepancies that would have caused the aircraft to climb rather than descend.


Synopsis: A319 flight crew reported the aircraft climbed for unknown reasons to FL401 after an autoflight descent was programmed and initiated from FL390.